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

com.google.api.services.compute.Compute Maven / Gradle / Ivy

There is a newer version: v1-rev20240903-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.compute;

/**
 * Service definition for Compute (v1).
 *
 * 

* Creates and runs virtual machines on Google Cloud Platform. *

* *

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

* *

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

* * @since 1.3 * @author Google, Inc. */ @SuppressWarnings("javadoc") public class Compute 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 Compute Engine 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://compute.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://compute.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 = "compute/v1/"; /** * 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/compute/v1"; /** * 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 Compute(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 */ Compute(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 AcceleratorTypes collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.AcceleratorTypes.List request = compute.acceleratorTypes().list(parameters ...)}
   * 
* * @return the resource collection */ public AcceleratorTypes acceleratorTypes() { return new AcceleratorTypes(); } /** * The "acceleratorTypes" collection of methods. */ public class AcceleratorTypes { /** * Retrieves an aggregated list of accelerator types. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "acceleratorTypes.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/acceleratorTypes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of accelerator types. To prevent failure, Google recommends that * you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "acceleratorTypes.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.AcceleratorTypeAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Returns the specified accelerator type. * * Create a request for the method "acceleratorTypes.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param acceleratorType Name of the accelerator type to return. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String acceleratorType) throws java.io.IOException { Get result = new Get(project, zone, acceleratorType); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern ACCELERATOR_TYPE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified accelerator type. * * Create a request for the method "acceleratorTypes.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param acceleratorType Name of the accelerator type to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String acceleratorType) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.AcceleratorType.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.acceleratorType = com.google.api.client.util.Preconditions.checkNotNull(acceleratorType, "Required parameter acceleratorType must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ACCELERATOR_TYPE_PATTERN.matcher(acceleratorType).matches(), "Parameter acceleratorType must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the accelerator type to return. */ @com.google.api.client.util.Key private java.lang.String acceleratorType; /** Name of the accelerator type to return. */ public java.lang.String getAcceleratorType() { return acceleratorType; } /** Name of the accelerator type to return. */ public Get setAcceleratorType(java.lang.String acceleratorType) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ACCELERATOR_TYPE_PATTERN.matcher(acceleratorType).matches(), "Parameter acceleratorType must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.acceleratorType = acceleratorType; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves a list of accelerator types that are available to the specified project. * * Create a request for the method "acceleratorTypes.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/acceleratorTypes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of accelerator types that are available to the specified project. * * Create a request for the method "acceleratorTypes.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.AcceleratorTypeList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public List setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Addresses collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Addresses.List request = compute.addresses().list(parameters ...)}
   * 
* * @return the resource collection */ public Addresses addresses() { return new Addresses(); } /** * The "addresses" collection of methods. */ public class Addresses { /** * Retrieves an aggregated list of addresses. To prevent failure, Google recommends that you set the * `returnPartialSuccess` parameter to `true`. * * Create a request for the method "addresses.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/addresses"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of addresses. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "addresses.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.AddressAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified address resource. * * Create a request for the method "addresses.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param address Name of the address resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String address) throws java.io.IOException { Delete result = new Delete(project, region, address); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/addresses/{address}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern ADDRESS_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified address resource. * * Create a request for the method "addresses.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param address Name of the address resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String address) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.address = com.google.api.client.util.Preconditions.checkNotNull(address, "Required parameter address must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ADDRESS_PATTERN.matcher(address).matches(), "Parameter address must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the address resource to delete. */ @com.google.api.client.util.Key private java.lang.String address; /** Name of the address resource to delete. */ public java.lang.String getAddress() { return address; } /** Name of the address resource to delete. */ public Delete setAddress(java.lang.String address) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ADDRESS_PATTERN.matcher(address).matches(), "Parameter address must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.address = address; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified address resource. * * Create a request for the method "addresses.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param address Name of the address resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String address) throws java.io.IOException { Get result = new Get(project, region, address); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/addresses/{address}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern ADDRESS_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified address resource. * * Create a request for the method "addresses.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param address Name of the address resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String address) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Address.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.address = com.google.api.client.util.Preconditions.checkNotNull(address, "Required parameter address must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ADDRESS_PATTERN.matcher(address).matches(), "Parameter address must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the address resource to return. */ @com.google.api.client.util.Key private java.lang.String address; /** Name of the address resource to return. */ public java.lang.String getAddress() { return address; } /** Name of the address resource to return. */ public Get setAddress(java.lang.String address) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ADDRESS_PATTERN.matcher(address).matches(), "Parameter address must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.address = address; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates an address resource in the specified project by using the data included in the request. * * Create a request for the method "addresses.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.Address} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Address content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/addresses"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates an address resource in the specified project by using the data included in the request. * * Create a request for the method "addresses.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.Address} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Address content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of addresses contained within the specified region. * * Create a request for the method "addresses.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/addresses"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of addresses contained within the specified region. * * Create a request for the method "addresses.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.AddressList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Moves the specified address resource. * * Create a request for the method "addresses.move". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Move#execute()} method to invoke the remote operation. * * @param project Source project ID which the Address is moved from. * @param region Name of the region for this request. * @param address Name of the address resource to move. * @param content the {@link com.google.api.services.compute.model.RegionAddressesMoveRequest} * @return the request */ public Move move(java.lang.String project, java.lang.String region, java.lang.String address, com.google.api.services.compute.model.RegionAddressesMoveRequest content) throws java.io.IOException { Move result = new Move(project, region, address, content); initialize(result); return result; } public class Move extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/addresses/{address}/move"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern ADDRESS_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Moves the specified address resource. * * Create a request for the method "addresses.move". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Move#execute()} method to invoke the remote operation.

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

* * @param project Source project ID which the Address is moved from. * @param region Name of the region for this request. * @param address Name of the address resource to move. * @param content the {@link com.google.api.services.compute.model.RegionAddressesMoveRequest} * @since 1.13 */ protected Move(java.lang.String project, java.lang.String region, java.lang.String address, com.google.api.services.compute.model.RegionAddressesMoveRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.address = com.google.api.client.util.Preconditions.checkNotNull(address, "Required parameter address must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ADDRESS_PATTERN.matcher(address).matches(), "Parameter address must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Move set$Xgafv(java.lang.String $Xgafv) { return (Move) super.set$Xgafv($Xgafv); } @Override public Move setAccessToken(java.lang.String accessToken) { return (Move) super.setAccessToken(accessToken); } @Override public Move setAlt(java.lang.String alt) { return (Move) super.setAlt(alt); } @Override public Move setCallback(java.lang.String callback) { return (Move) super.setCallback(callback); } @Override public Move setFields(java.lang.String fields) { return (Move) super.setFields(fields); } @Override public Move setKey(java.lang.String key) { return (Move) super.setKey(key); } @Override public Move setOauthToken(java.lang.String oauthToken) { return (Move) super.setOauthToken(oauthToken); } @Override public Move setPrettyPrint(java.lang.Boolean prettyPrint) { return (Move) super.setPrettyPrint(prettyPrint); } @Override public Move setQuotaUser(java.lang.String quotaUser) { return (Move) super.setQuotaUser(quotaUser); } @Override public Move setUploadType(java.lang.String uploadType) { return (Move) super.setUploadType(uploadType); } @Override public Move setUploadProtocol(java.lang.String uploadProtocol) { return (Move) super.setUploadProtocol(uploadProtocol); } @Override public Move setUserIp(java.lang.String userIp) { return (Move) super.setUserIp(userIp); } /** Source project ID which the Address is moved from. */ @com.google.api.client.util.Key private java.lang.String project; /** Source project ID which the Address is moved from. */ public java.lang.String getProject() { return project; } /** Source project ID which the Address is moved from. */ public Move setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Move setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the address resource to move. */ @com.google.api.client.util.Key private java.lang.String address; /** Name of the address resource to move. */ public java.lang.String getAddress() { return address; } /** Name of the address resource to move. */ public Move setAddress(java.lang.String address) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ADDRESS_PATTERN.matcher(address).matches(), "Parameter address must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.address = address; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Move setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Move set(String parameterName, Object value) { return (Move) super.set(parameterName, value); } } /** * Sets the labels on an Address. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "addresses.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, region, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/addresses/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on an Address. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "addresses.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The region for this request. */ public java.lang.String getRegion() { return region; } /** The region for this request. */ public SetLabels setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetLabels setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Autoscalers collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Autoscalers.List request = compute.autoscalers().list(parameters ...)}
   * 
* * @return the resource collection */ public Autoscalers autoscalers() { return new Autoscalers(); } /** * The "autoscalers" collection of methods. */ public class Autoscalers { /** * Retrieves an aggregated list of autoscalers. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "autoscalers.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/autoscalers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of autoscalers. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "autoscalers.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.AutoscalerAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified autoscaler. * * Create a request for the method "autoscalers.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param autoscaler Name of the autoscaler to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String zone, java.lang.String autoscaler) throws java.io.IOException { Delete result = new Delete(project, zone, autoscaler); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/autoscalers/{autoscaler}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern AUTOSCALER_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified autoscaler. * * Create a request for the method "autoscalers.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone for this request. * @param autoscaler Name of the autoscaler to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String zone, java.lang.String autoscaler) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.autoscaler = com.google.api.client.util.Preconditions.checkNotNull(autoscaler, "Required parameter autoscaler must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(AUTOSCALER_PATTERN.matcher(autoscaler).matches(), "Parameter autoscaler must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public Delete setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the autoscaler to delete. */ @com.google.api.client.util.Key private java.lang.String autoscaler; /** Name of the autoscaler to delete. */ public java.lang.String getAutoscaler() { return autoscaler; } /** Name of the autoscaler to delete. */ public Delete setAutoscaler(java.lang.String autoscaler) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(AUTOSCALER_PATTERN.matcher(autoscaler).matches(), "Parameter autoscaler must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.autoscaler = autoscaler; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified autoscaler resource. * * Create a request for the method "autoscalers.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param autoscaler Name of the autoscaler to return. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String autoscaler) throws java.io.IOException { Get result = new Get(project, zone, autoscaler); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/autoscalers/{autoscaler}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern AUTOSCALER_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified autoscaler resource. * * Create a request for the method "autoscalers.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone for this request. * @param autoscaler Name of the autoscaler to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String autoscaler) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Autoscaler.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.autoscaler = com.google.api.client.util.Preconditions.checkNotNull(autoscaler, "Required parameter autoscaler must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(AUTOSCALER_PATTERN.matcher(autoscaler).matches(), "Parameter autoscaler must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the autoscaler to return. */ @com.google.api.client.util.Key private java.lang.String autoscaler; /** Name of the autoscaler to return. */ public java.lang.String getAutoscaler() { return autoscaler; } /** Name of the autoscaler to return. */ public Get setAutoscaler(java.lang.String autoscaler) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(AUTOSCALER_PATTERN.matcher(autoscaler).matches(), "Parameter autoscaler must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.autoscaler = autoscaler; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates an autoscaler in the specified project using the data included in the request. * * Create a request for the method "autoscalers.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.Autoscaler} * @return the request */ public Insert insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.Autoscaler content) throws java.io.IOException { Insert result = new Insert(project, zone, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/autoscalers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates an autoscaler in the specified project using the data included in the request. * * Create a request for the method "autoscalers.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.Autoscaler} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.Autoscaler content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public Insert setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of autoscalers contained within the specified zone. * * Create a request for the method "autoscalers.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/autoscalers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of autoscalers contained within the specified zone. * * Create a request for the method "autoscalers.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.AutoscalerList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public List setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates an autoscaler in the specified project using the data included in the request. This * method supports PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "autoscalers.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.Autoscaler} * @return the request */ public Patch patch(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.Autoscaler content) throws java.io.IOException { Patch result = new Patch(project, zone, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/autoscalers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern AUTOSCALER_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates an autoscaler in the specified project using the data included in the request. This * method supports PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "autoscalers.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.Autoscaler} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.Autoscaler content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public Patch setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the autoscaler to patch. */ @com.google.api.client.util.Key private java.lang.String autoscaler; /** Name of the autoscaler to patch. */ public java.lang.String getAutoscaler() { return autoscaler; } /** Name of the autoscaler to patch. */ public Patch setAutoscaler(java.lang.String autoscaler) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(AUTOSCALER_PATTERN.matcher(autoscaler).matches(), "Parameter autoscaler must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.autoscaler = autoscaler; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates an autoscaler in the specified project using the data included in the request. * * Create a request for the method "autoscalers.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.Autoscaler} * @return the request */ public Update update(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.Autoscaler content) throws java.io.IOException { Update result = new Update(project, zone, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/autoscalers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern AUTOSCALER_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates an autoscaler in the specified project using the data included in the request. * * Create a request for the method "autoscalers.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.Autoscaler} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.Autoscaler content) { super(Compute.this, "PUT", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public Update setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the autoscaler to update. */ @com.google.api.client.util.Key private java.lang.String autoscaler; /** Name of the autoscaler to update. */ public java.lang.String getAutoscaler() { return autoscaler; } /** Name of the autoscaler to update. */ public Update setAutoscaler(java.lang.String autoscaler) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(AUTOSCALER_PATTERN.matcher(autoscaler).matches(), "Parameter autoscaler must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.autoscaler = autoscaler; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the BackendBuckets collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.BackendBuckets.List request = compute.backendBuckets().list(parameters ...)}
   * 
* * @return the resource collection */ public BackendBuckets backendBuckets() { return new BackendBuckets(); } /** * The "backendBuckets" collection of methods. */ public class BackendBuckets { /** * Adds a key for validating requests with signed URLs for this backend bucket. * * Create a request for the method "backendBuckets.addSignedUrlKey". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddSignedUrlKey#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param backendBucket Name of the BackendBucket resource to which the Signed URL Key should be added. The name should * conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.SignedUrlKey} * @return the request */ public AddSignedUrlKey addSignedUrlKey(java.lang.String project, java.lang.String backendBucket, com.google.api.services.compute.model.SignedUrlKey content) throws java.io.IOException { AddSignedUrlKey result = new AddSignedUrlKey(project, backendBucket, content); initialize(result); return result; } public class AddSignedUrlKey extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Adds a key for validating requests with signed URLs for this backend bucket. * * Create a request for the method "backendBuckets.addSignedUrlKey". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddSignedUrlKey#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param backendBucket Name of the BackendBucket resource to which the Signed URL Key should be added. The name should * conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.SignedUrlKey} * @since 1.13 */ protected AddSignedUrlKey(java.lang.String project, java.lang.String backendBucket, com.google.api.services.compute.model.SignedUrlKey content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendBucket = com.google.api.client.util.Preconditions.checkNotNull(backendBucket, "Required parameter backendBucket must be specified."); } @Override public AddSignedUrlKey set$Xgafv(java.lang.String $Xgafv) { return (AddSignedUrlKey) super.set$Xgafv($Xgafv); } @Override public AddSignedUrlKey setAccessToken(java.lang.String accessToken) { return (AddSignedUrlKey) super.setAccessToken(accessToken); } @Override public AddSignedUrlKey setAlt(java.lang.String alt) { return (AddSignedUrlKey) super.setAlt(alt); } @Override public AddSignedUrlKey setCallback(java.lang.String callback) { return (AddSignedUrlKey) super.setCallback(callback); } @Override public AddSignedUrlKey setFields(java.lang.String fields) { return (AddSignedUrlKey) super.setFields(fields); } @Override public AddSignedUrlKey setKey(java.lang.String key) { return (AddSignedUrlKey) super.setKey(key); } @Override public AddSignedUrlKey setOauthToken(java.lang.String oauthToken) { return (AddSignedUrlKey) super.setOauthToken(oauthToken); } @Override public AddSignedUrlKey setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddSignedUrlKey) super.setPrettyPrint(prettyPrint); } @Override public AddSignedUrlKey setQuotaUser(java.lang.String quotaUser) { return (AddSignedUrlKey) super.setQuotaUser(quotaUser); } @Override public AddSignedUrlKey setUploadType(java.lang.String uploadType) { return (AddSignedUrlKey) super.setUploadType(uploadType); } @Override public AddSignedUrlKey setUploadProtocol(java.lang.String uploadProtocol) { return (AddSignedUrlKey) super.setUploadProtocol(uploadProtocol); } @Override public AddSignedUrlKey setUserIp(java.lang.String userIp) { return (AddSignedUrlKey) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddSignedUrlKey setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the BackendBucket resource to which the Signed URL Key should be added. The name * should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String backendBucket; /** Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035. */ public java.lang.String getBackendBucket() { return backendBucket; } /** * Name of the BackendBucket resource to which the Signed URL Key should be added. The name * should conform to RFC1035. */ public AddSignedUrlKey setBackendBucket(java.lang.String backendBucket) { this.backendBucket = backendBucket; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddSignedUrlKey setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddSignedUrlKey set(String parameterName, Object value) { return (AddSignedUrlKey) super.set(parameterName, value); } } /** * Deletes the specified BackendBucket resource. * * Create a request for the method "backendBuckets.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param backendBucket Name of the BackendBucket resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String backendBucket) throws java.io.IOException { Delete result = new Delete(project, backendBucket); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendBuckets/{backendBucket}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern BACKEND_BUCKET_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified BackendBucket resource. * * Create a request for the method "backendBuckets.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param backendBucket Name of the BackendBucket resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String backendBucket) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendBucket = com.google.api.client.util.Preconditions.checkNotNull(backendBucket, "Required parameter backendBucket must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_BUCKET_PATTERN.matcher(backendBucket).matches(), "Parameter backendBucket must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the BackendBucket resource to delete. */ @com.google.api.client.util.Key private java.lang.String backendBucket; /** Name of the BackendBucket resource to delete. */ public java.lang.String getBackendBucket() { return backendBucket; } /** Name of the BackendBucket resource to delete. */ public Delete setBackendBucket(java.lang.String backendBucket) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_BUCKET_PATTERN.matcher(backendBucket).matches(), "Parameter backendBucket must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.backendBucket = backendBucket; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Deletes a key for validating requests with signed URLs for this backend bucket. * * Create a request for the method "backendBuckets.deleteSignedUrlKey". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link DeleteSignedUrlKey#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param backendBucket Name of the BackendBucket resource to which the Signed URL Key should be added. The name should * conform to RFC1035. * @param keyName The name of the Signed URL Key to delete. * @return the request */ public DeleteSignedUrlKey deleteSignedUrlKey(java.lang.String project, java.lang.String backendBucket, java.lang.String keyName) throws java.io.IOException { DeleteSignedUrlKey result = new DeleteSignedUrlKey(project, backendBucket, keyName); initialize(result); return result; } public class DeleteSignedUrlKey extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Deletes a key for validating requests with signed URLs for this backend bucket. * * Create a request for the method "backendBuckets.deleteSignedUrlKey". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link DeleteSignedUrlKey#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param backendBucket Name of the BackendBucket resource to which the Signed URL Key should be added. The name should * conform to RFC1035. * @param keyName The name of the Signed URL Key to delete. * @since 1.13 */ protected DeleteSignedUrlKey(java.lang.String project, java.lang.String backendBucket, java.lang.String keyName) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendBucket = com.google.api.client.util.Preconditions.checkNotNull(backendBucket, "Required parameter backendBucket must be specified."); this.keyName = com.google.api.client.util.Preconditions.checkNotNull(keyName, "Required parameter keyName must be specified."); } @Override public DeleteSignedUrlKey set$Xgafv(java.lang.String $Xgafv) { return (DeleteSignedUrlKey) super.set$Xgafv($Xgafv); } @Override public DeleteSignedUrlKey setAccessToken(java.lang.String accessToken) { return (DeleteSignedUrlKey) super.setAccessToken(accessToken); } @Override public DeleteSignedUrlKey setAlt(java.lang.String alt) { return (DeleteSignedUrlKey) super.setAlt(alt); } @Override public DeleteSignedUrlKey setCallback(java.lang.String callback) { return (DeleteSignedUrlKey) super.setCallback(callback); } @Override public DeleteSignedUrlKey setFields(java.lang.String fields) { return (DeleteSignedUrlKey) super.setFields(fields); } @Override public DeleteSignedUrlKey setKey(java.lang.String key) { return (DeleteSignedUrlKey) super.setKey(key); } @Override public DeleteSignedUrlKey setOauthToken(java.lang.String oauthToken) { return (DeleteSignedUrlKey) super.setOauthToken(oauthToken); } @Override public DeleteSignedUrlKey setPrettyPrint(java.lang.Boolean prettyPrint) { return (DeleteSignedUrlKey) super.setPrettyPrint(prettyPrint); } @Override public DeleteSignedUrlKey setQuotaUser(java.lang.String quotaUser) { return (DeleteSignedUrlKey) super.setQuotaUser(quotaUser); } @Override public DeleteSignedUrlKey setUploadType(java.lang.String uploadType) { return (DeleteSignedUrlKey) super.setUploadType(uploadType); } @Override public DeleteSignedUrlKey setUploadProtocol(java.lang.String uploadProtocol) { return (DeleteSignedUrlKey) super.setUploadProtocol(uploadProtocol); } @Override public DeleteSignedUrlKey setUserIp(java.lang.String userIp) { return (DeleteSignedUrlKey) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public DeleteSignedUrlKey setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the BackendBucket resource to which the Signed URL Key should be added. The name * should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String backendBucket; /** Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035. */ public java.lang.String getBackendBucket() { return backendBucket; } /** * Name of the BackendBucket resource to which the Signed URL Key should be added. The name * should conform to RFC1035. */ public DeleteSignedUrlKey setBackendBucket(java.lang.String backendBucket) { this.backendBucket = backendBucket; return this; } /** The name of the Signed URL Key to delete. */ @com.google.api.client.util.Key private java.lang.String keyName; /** The name of the Signed URL Key to delete. */ public java.lang.String getKeyName() { return keyName; } /** The name of the Signed URL Key to delete. */ public DeleteSignedUrlKey setKeyName(java.lang.String keyName) { this.keyName = keyName; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public DeleteSignedUrlKey setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public DeleteSignedUrlKey set(String parameterName, Object value) { return (DeleteSignedUrlKey) super.set(parameterName, value); } } /** * Returns the specified BackendBucket resource. * * Create a request for the method "backendBuckets.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param backendBucket Name of the BackendBucket resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String backendBucket) throws java.io.IOException { Get result = new Get(project, backendBucket); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendBuckets/{backendBucket}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern BACKEND_BUCKET_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified BackendBucket resource. * * Create a request for the method "backendBuckets.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param backendBucket Name of the BackendBucket resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String backendBucket) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.BackendBucket.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendBucket = com.google.api.client.util.Preconditions.checkNotNull(backendBucket, "Required parameter backendBucket must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_BUCKET_PATTERN.matcher(backendBucket).matches(), "Parameter backendBucket must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the BackendBucket resource to return. */ @com.google.api.client.util.Key private java.lang.String backendBucket; /** Name of the BackendBucket resource to return. */ public java.lang.String getBackendBucket() { return backendBucket; } /** Name of the BackendBucket resource to return. */ public Get setBackendBucket(java.lang.String backendBucket) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_BUCKET_PATTERN.matcher(backendBucket).matches(), "Parameter backendBucket must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.backendBucket = backendBucket; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "backendBuckets.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendBuckets/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "backendBuckets.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a BackendBucket resource in the specified project using the data included in the request. * * Create a request for the method "backendBuckets.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.BackendBucket} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.BackendBucket content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendBuckets"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a BackendBucket resource in the specified project using the data included in the * request. * * Create a request for the method "backendBuckets.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.BackendBucket} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.BackendBucket content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of BackendBucket resources available to the specified project. * * Create a request for the method "backendBuckets.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendBuckets"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of BackendBucket resources available to the specified project. * * Create a request for the method "backendBuckets.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.BackendBucketList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the specified BackendBucket resource with the data included in the request. This method * supports PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "backendBuckets.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param backendBucket Name of the BackendBucket resource to patch. * @param content the {@link com.google.api.services.compute.model.BackendBucket} * @return the request */ public Patch patch(java.lang.String project, java.lang.String backendBucket, com.google.api.services.compute.model.BackendBucket content) throws java.io.IOException { Patch result = new Patch(project, backendBucket, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendBuckets/{backendBucket}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern BACKEND_BUCKET_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified BackendBucket resource with the data included in the request. This method * supports PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "backendBuckets.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param backendBucket Name of the BackendBucket resource to patch. * @param content the {@link com.google.api.services.compute.model.BackendBucket} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String backendBucket, com.google.api.services.compute.model.BackendBucket content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendBucket = com.google.api.client.util.Preconditions.checkNotNull(backendBucket, "Required parameter backendBucket must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_BUCKET_PATTERN.matcher(backendBucket).matches(), "Parameter backendBucket must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the BackendBucket resource to patch. */ @com.google.api.client.util.Key private java.lang.String backendBucket; /** Name of the BackendBucket resource to patch. */ public java.lang.String getBackendBucket() { return backendBucket; } /** Name of the BackendBucket resource to patch. */ public Patch setBackendBucket(java.lang.String backendBucket) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_BUCKET_PATTERN.matcher(backendBucket).matches(), "Parameter backendBucket must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.backendBucket = backendBucket; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Sets the edge security policy for the specified backend bucket. * * Create a request for the method "backendBuckets.setEdgeSecurityPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetEdgeSecurityPolicy#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param backendBucket Name of the BackendBucket resource to which the security policy should be set. The name should * conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyReference} * @return the request */ public SetEdgeSecurityPolicy setEdgeSecurityPolicy(java.lang.String project, java.lang.String backendBucket, com.google.api.services.compute.model.SecurityPolicyReference content) throws java.io.IOException { SetEdgeSecurityPolicy result = new SetEdgeSecurityPolicy(project, backendBucket, content); initialize(result); return result; } public class SetEdgeSecurityPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Sets the edge security policy for the specified backend bucket. * * Create a request for the method "backendBuckets.setEdgeSecurityPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetEdgeSecurityPolicy#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param backendBucket Name of the BackendBucket resource to which the security policy should be set. The name should * conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyReference} * @since 1.13 */ protected SetEdgeSecurityPolicy(java.lang.String project, java.lang.String backendBucket, com.google.api.services.compute.model.SecurityPolicyReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendBucket = com.google.api.client.util.Preconditions.checkNotNull(backendBucket, "Required parameter backendBucket must be specified."); } @Override public SetEdgeSecurityPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetEdgeSecurityPolicy) super.set$Xgafv($Xgafv); } @Override public SetEdgeSecurityPolicy setAccessToken(java.lang.String accessToken) { return (SetEdgeSecurityPolicy) super.setAccessToken(accessToken); } @Override public SetEdgeSecurityPolicy setAlt(java.lang.String alt) { return (SetEdgeSecurityPolicy) super.setAlt(alt); } @Override public SetEdgeSecurityPolicy setCallback(java.lang.String callback) { return (SetEdgeSecurityPolicy) super.setCallback(callback); } @Override public SetEdgeSecurityPolicy setFields(java.lang.String fields) { return (SetEdgeSecurityPolicy) super.setFields(fields); } @Override public SetEdgeSecurityPolicy setKey(java.lang.String key) { return (SetEdgeSecurityPolicy) super.setKey(key); } @Override public SetEdgeSecurityPolicy setOauthToken(java.lang.String oauthToken) { return (SetEdgeSecurityPolicy) super.setOauthToken(oauthToken); } @Override public SetEdgeSecurityPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetEdgeSecurityPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetEdgeSecurityPolicy setQuotaUser(java.lang.String quotaUser) { return (SetEdgeSecurityPolicy) super.setQuotaUser(quotaUser); } @Override public SetEdgeSecurityPolicy setUploadType(java.lang.String uploadType) { return (SetEdgeSecurityPolicy) super.setUploadType(uploadType); } @Override public SetEdgeSecurityPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetEdgeSecurityPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetEdgeSecurityPolicy setUserIp(java.lang.String userIp) { return (SetEdgeSecurityPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetEdgeSecurityPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the BackendBucket resource to which the security policy should be set. The name * should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String backendBucket; /** Name of the BackendBucket resource to which the security policy should be set. The name should conform to RFC1035. */ public java.lang.String getBackendBucket() { return backendBucket; } /** * Name of the BackendBucket resource to which the security policy should be set. The name * should conform to RFC1035. */ public SetEdgeSecurityPolicy setBackendBucket(java.lang.String backendBucket) { this.backendBucket = backendBucket; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetEdgeSecurityPolicy setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetEdgeSecurityPolicy set(String parameterName, Object value) { return (SetEdgeSecurityPolicy) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "backendBuckets.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendBuckets/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "backendBuckets.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "backendBuckets.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendBuckets/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "backendBuckets.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } /** * Updates the specified BackendBucket resource with the data included in the request. * * Create a request for the method "backendBuckets.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param backendBucket Name of the BackendBucket resource to update. * @param content the {@link com.google.api.services.compute.model.BackendBucket} * @return the request */ public Update update(java.lang.String project, java.lang.String backendBucket, com.google.api.services.compute.model.BackendBucket content) throws java.io.IOException { Update result = new Update(project, backendBucket, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendBuckets/{backendBucket}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern BACKEND_BUCKET_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified BackendBucket resource with the data included in the request. * * Create a request for the method "backendBuckets.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param backendBucket Name of the BackendBucket resource to update. * @param content the {@link com.google.api.services.compute.model.BackendBucket} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String backendBucket, com.google.api.services.compute.model.BackendBucket content) { super(Compute.this, "PUT", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendBucket = com.google.api.client.util.Preconditions.checkNotNull(backendBucket, "Required parameter backendBucket must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_BUCKET_PATTERN.matcher(backendBucket).matches(), "Parameter backendBucket must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the BackendBucket resource to update. */ @com.google.api.client.util.Key private java.lang.String backendBucket; /** Name of the BackendBucket resource to update. */ public java.lang.String getBackendBucket() { return backendBucket; } /** Name of the BackendBucket resource to update. */ public Update setBackendBucket(java.lang.String backendBucket) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_BUCKET_PATTERN.matcher(backendBucket).matches(), "Parameter backendBucket must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.backendBucket = backendBucket; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the BackendServices collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.BackendServices.List request = compute.backendServices().list(parameters ...)}
   * 
* * @return the resource collection */ public BackendServices backendServices() { return new BackendServices(); } /** * The "backendServices" collection of methods. */ public class BackendServices { /** * Adds a key for validating requests with signed URLs for this backend service. * * Create a request for the method "backendServices.addSignedUrlKey". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddSignedUrlKey#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param backendService Name of the BackendService resource to which the Signed URL Key should be added. The name should * conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.SignedUrlKey} * @return the request */ public AddSignedUrlKey addSignedUrlKey(java.lang.String project, java.lang.String backendService, com.google.api.services.compute.model.SignedUrlKey content) throws java.io.IOException { AddSignedUrlKey result = new AddSignedUrlKey(project, backendService, content); initialize(result); return result; } public class AddSignedUrlKey extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Adds a key for validating requests with signed URLs for this backend service. * * Create a request for the method "backendServices.addSignedUrlKey". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddSignedUrlKey#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param backendService Name of the BackendService resource to which the Signed URL Key should be added. The name should * conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.SignedUrlKey} * @since 1.13 */ protected AddSignedUrlKey(java.lang.String project, java.lang.String backendService, com.google.api.services.compute.model.SignedUrlKey content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendService = com.google.api.client.util.Preconditions.checkNotNull(backendService, "Required parameter backendService must be specified."); } @Override public AddSignedUrlKey set$Xgafv(java.lang.String $Xgafv) { return (AddSignedUrlKey) super.set$Xgafv($Xgafv); } @Override public AddSignedUrlKey setAccessToken(java.lang.String accessToken) { return (AddSignedUrlKey) super.setAccessToken(accessToken); } @Override public AddSignedUrlKey setAlt(java.lang.String alt) { return (AddSignedUrlKey) super.setAlt(alt); } @Override public AddSignedUrlKey setCallback(java.lang.String callback) { return (AddSignedUrlKey) super.setCallback(callback); } @Override public AddSignedUrlKey setFields(java.lang.String fields) { return (AddSignedUrlKey) super.setFields(fields); } @Override public AddSignedUrlKey setKey(java.lang.String key) { return (AddSignedUrlKey) super.setKey(key); } @Override public AddSignedUrlKey setOauthToken(java.lang.String oauthToken) { return (AddSignedUrlKey) super.setOauthToken(oauthToken); } @Override public AddSignedUrlKey setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddSignedUrlKey) super.setPrettyPrint(prettyPrint); } @Override public AddSignedUrlKey setQuotaUser(java.lang.String quotaUser) { return (AddSignedUrlKey) super.setQuotaUser(quotaUser); } @Override public AddSignedUrlKey setUploadType(java.lang.String uploadType) { return (AddSignedUrlKey) super.setUploadType(uploadType); } @Override public AddSignedUrlKey setUploadProtocol(java.lang.String uploadProtocol) { return (AddSignedUrlKey) super.setUploadProtocol(uploadProtocol); } @Override public AddSignedUrlKey setUserIp(java.lang.String userIp) { return (AddSignedUrlKey) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddSignedUrlKey setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the BackendService resource to which the Signed URL Key should be added. The name * should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String backendService; /** Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035. */ public java.lang.String getBackendService() { return backendService; } /** * Name of the BackendService resource to which the Signed URL Key should be added. The name * should conform to RFC1035. */ public AddSignedUrlKey setBackendService(java.lang.String backendService) { this.backendService = backendService; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddSignedUrlKey setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddSignedUrlKey set(String parameterName, Object value) { return (AddSignedUrlKey) super.set(parameterName, value); } } /** * Retrieves the list of all BackendService resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the `returnPartialSuccess` * parameter to `true`. * * Create a request for the method "backendServices.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Name of the project scoping this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/backendServices"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of all BackendService resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the * `returnPartialSuccess` parameter to `true`. * * Create a request for the method "backendServices.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Name of the project scoping this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.BackendServiceAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Name of the project scoping this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Name of the project scoping this request. */ public java.lang.String getProject() { return project; } /** Name of the project scoping this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified BackendService resource. * * Create a request for the method "backendServices.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param backendService Name of the BackendService resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String backendService) throws java.io.IOException { Delete result = new Delete(project, backendService); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendServices/{backendService}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern BACKEND_SERVICE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified BackendService resource. * * Create a request for the method "backendServices.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param backendService Name of the BackendService resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String backendService) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendService = com.google.api.client.util.Preconditions.checkNotNull(backendService, "Required parameter backendService must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the BackendService resource to delete. */ @com.google.api.client.util.Key private java.lang.String backendService; /** Name of the BackendService resource to delete. */ public java.lang.String getBackendService() { return backendService; } /** Name of the BackendService resource to delete. */ public Delete setBackendService(java.lang.String backendService) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.backendService = backendService; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Deletes a key for validating requests with signed URLs for this backend service. * * Create a request for the method "backendServices.deleteSignedUrlKey". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link DeleteSignedUrlKey#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param backendService Name of the BackendService resource to which the Signed URL Key should be added. The name should * conform to RFC1035. * @param keyName The name of the Signed URL Key to delete. * @return the request */ public DeleteSignedUrlKey deleteSignedUrlKey(java.lang.String project, java.lang.String backendService, java.lang.String keyName) throws java.io.IOException { DeleteSignedUrlKey result = new DeleteSignedUrlKey(project, backendService, keyName); initialize(result); return result; } public class DeleteSignedUrlKey extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Deletes a key for validating requests with signed URLs for this backend service. * * Create a request for the method "backendServices.deleteSignedUrlKey". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link DeleteSignedUrlKey#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param backendService Name of the BackendService resource to which the Signed URL Key should be added. The name should * conform to RFC1035. * @param keyName The name of the Signed URL Key to delete. * @since 1.13 */ protected DeleteSignedUrlKey(java.lang.String project, java.lang.String backendService, java.lang.String keyName) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendService = com.google.api.client.util.Preconditions.checkNotNull(backendService, "Required parameter backendService must be specified."); this.keyName = com.google.api.client.util.Preconditions.checkNotNull(keyName, "Required parameter keyName must be specified."); } @Override public DeleteSignedUrlKey set$Xgafv(java.lang.String $Xgafv) { return (DeleteSignedUrlKey) super.set$Xgafv($Xgafv); } @Override public DeleteSignedUrlKey setAccessToken(java.lang.String accessToken) { return (DeleteSignedUrlKey) super.setAccessToken(accessToken); } @Override public DeleteSignedUrlKey setAlt(java.lang.String alt) { return (DeleteSignedUrlKey) super.setAlt(alt); } @Override public DeleteSignedUrlKey setCallback(java.lang.String callback) { return (DeleteSignedUrlKey) super.setCallback(callback); } @Override public DeleteSignedUrlKey setFields(java.lang.String fields) { return (DeleteSignedUrlKey) super.setFields(fields); } @Override public DeleteSignedUrlKey setKey(java.lang.String key) { return (DeleteSignedUrlKey) super.setKey(key); } @Override public DeleteSignedUrlKey setOauthToken(java.lang.String oauthToken) { return (DeleteSignedUrlKey) super.setOauthToken(oauthToken); } @Override public DeleteSignedUrlKey setPrettyPrint(java.lang.Boolean prettyPrint) { return (DeleteSignedUrlKey) super.setPrettyPrint(prettyPrint); } @Override public DeleteSignedUrlKey setQuotaUser(java.lang.String quotaUser) { return (DeleteSignedUrlKey) super.setQuotaUser(quotaUser); } @Override public DeleteSignedUrlKey setUploadType(java.lang.String uploadType) { return (DeleteSignedUrlKey) super.setUploadType(uploadType); } @Override public DeleteSignedUrlKey setUploadProtocol(java.lang.String uploadProtocol) { return (DeleteSignedUrlKey) super.setUploadProtocol(uploadProtocol); } @Override public DeleteSignedUrlKey setUserIp(java.lang.String userIp) { return (DeleteSignedUrlKey) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public DeleteSignedUrlKey setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the BackendService resource to which the Signed URL Key should be added. The name * should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String backendService; /** Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035. */ public java.lang.String getBackendService() { return backendService; } /** * Name of the BackendService resource to which the Signed URL Key should be added. The name * should conform to RFC1035. */ public DeleteSignedUrlKey setBackendService(java.lang.String backendService) { this.backendService = backendService; return this; } /** The name of the Signed URL Key to delete. */ @com.google.api.client.util.Key private java.lang.String keyName; /** The name of the Signed URL Key to delete. */ public java.lang.String getKeyName() { return keyName; } /** The name of the Signed URL Key to delete. */ public DeleteSignedUrlKey setKeyName(java.lang.String keyName) { this.keyName = keyName; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public DeleteSignedUrlKey setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public DeleteSignedUrlKey set(String parameterName, Object value) { return (DeleteSignedUrlKey) super.set(parameterName, value); } } /** * Returns the specified BackendService resource. * * Create a request for the method "backendServices.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param backendService Name of the BackendService resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String backendService) throws java.io.IOException { Get result = new Get(project, backendService); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendServices/{backendService}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern BACKEND_SERVICE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified BackendService resource. * * Create a request for the method "backendServices.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param backendService Name of the BackendService resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String backendService) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.BackendService.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendService = com.google.api.client.util.Preconditions.checkNotNull(backendService, "Required parameter backendService must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the BackendService resource to return. */ @com.google.api.client.util.Key private java.lang.String backendService; /** Name of the BackendService resource to return. */ public java.lang.String getBackendService() { return backendService; } /** Name of the BackendService resource to return. */ public Get setBackendService(java.lang.String backendService) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.backendService = backendService; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the most recent health check results for this BackendService. Example request body: { * "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" } * * Create a request for the method "backendServices.getHealth". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetHealth#execute()} method to invoke the remote operation. * * @param project * @param backendService Name of the BackendService resource to which the queried instance belongs. * @param content the {@link com.google.api.services.compute.model.ResourceGroupReference} * @return the request */ public GetHealth getHealth(java.lang.String project, java.lang.String backendService, com.google.api.services.compute.model.ResourceGroupReference content) throws java.io.IOException { GetHealth result = new GetHealth(project, backendService, content); initialize(result); return result; } public class GetHealth extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendServices/{backendService}/getHealth"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern BACKEND_SERVICE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the most recent health check results for this BackendService. Example request body: { * "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" } * * Create a request for the method "backendServices.getHealth". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetHealth#execute()} method to invoke the remote operation.

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

* * @param project * @param backendService Name of the BackendService resource to which the queried instance belongs. * @param content the {@link com.google.api.services.compute.model.ResourceGroupReference} * @since 1.13 */ protected GetHealth(java.lang.String project, java.lang.String backendService, com.google.api.services.compute.model.ResourceGroupReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.BackendServiceGroupHealth.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendService = com.google.api.client.util.Preconditions.checkNotNull(backendService, "Required parameter backendService must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public GetHealth set$Xgafv(java.lang.String $Xgafv) { return (GetHealth) super.set$Xgafv($Xgafv); } @Override public GetHealth setAccessToken(java.lang.String accessToken) { return (GetHealth) super.setAccessToken(accessToken); } @Override public GetHealth setAlt(java.lang.String alt) { return (GetHealth) super.setAlt(alt); } @Override public GetHealth setCallback(java.lang.String callback) { return (GetHealth) super.setCallback(callback); } @Override public GetHealth setFields(java.lang.String fields) { return (GetHealth) super.setFields(fields); } @Override public GetHealth setKey(java.lang.String key) { return (GetHealth) super.setKey(key); } @Override public GetHealth setOauthToken(java.lang.String oauthToken) { return (GetHealth) super.setOauthToken(oauthToken); } @Override public GetHealth setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetHealth) super.setPrettyPrint(prettyPrint); } @Override public GetHealth setQuotaUser(java.lang.String quotaUser) { return (GetHealth) super.setQuotaUser(quotaUser); } @Override public GetHealth setUploadType(java.lang.String uploadType) { return (GetHealth) super.setUploadType(uploadType); } @Override public GetHealth setUploadProtocol(java.lang.String uploadProtocol) { return (GetHealth) super.setUploadProtocol(uploadProtocol); } @Override public GetHealth setUserIp(java.lang.String userIp) { return (GetHealth) super.setUserIp(userIp); } @com.google.api.client.util.Key private java.lang.String project; /** */ public java.lang.String getProject() { return project; } public GetHealth setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the BackendService resource to which the queried instance belongs. */ @com.google.api.client.util.Key private java.lang.String backendService; /** Name of the BackendService resource to which the queried instance belongs. */ public java.lang.String getBackendService() { return backendService; } /** Name of the BackendService resource to which the queried instance belongs. */ public GetHealth setBackendService(java.lang.String backendService) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.backendService = backendService; return this; } @Override public GetHealth set(String parameterName, Object value) { return (GetHealth) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "backendServices.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendServices/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "backendServices.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a BackendService resource in the specified project using the data included in the * request. For more information, see Backend services overview . * * Create a request for the method "backendServices.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.BackendService} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.BackendService content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendServices"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a BackendService resource in the specified project using the data included in the * request. For more information, see Backend services overview . * * Create a request for the method "backendServices.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.BackendService} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.BackendService content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of BackendService resources available to the specified project. * * Create a request for the method "backendServices.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendServices"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of BackendService resources available to the specified project. * * Create a request for the method "backendServices.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.BackendServiceList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Retrieves a list of all usable backend services in the specified project. * * Create a request for the method "backendServices.listUsable". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListUsable#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public ListUsable listUsable(java.lang.String project) throws java.io.IOException { ListUsable result = new ListUsable(project); initialize(result); return result; } public class ListUsable extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendServices/listUsable"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves a list of all usable backend services in the specified project. * * Create a request for the method "backendServices.listUsable". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListUsable#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @since 1.13 */ protected ListUsable(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.BackendServiceListUsable.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 ListUsable set$Xgafv(java.lang.String $Xgafv) { return (ListUsable) super.set$Xgafv($Xgafv); } @Override public ListUsable setAccessToken(java.lang.String accessToken) { return (ListUsable) super.setAccessToken(accessToken); } @Override public ListUsable setAlt(java.lang.String alt) { return (ListUsable) super.setAlt(alt); } @Override public ListUsable setCallback(java.lang.String callback) { return (ListUsable) super.setCallback(callback); } @Override public ListUsable setFields(java.lang.String fields) { return (ListUsable) super.setFields(fields); } @Override public ListUsable setKey(java.lang.String key) { return (ListUsable) super.setKey(key); } @Override public ListUsable setOauthToken(java.lang.String oauthToken) { return (ListUsable) super.setOauthToken(oauthToken); } @Override public ListUsable setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListUsable) super.setPrettyPrint(prettyPrint); } @Override public ListUsable setQuotaUser(java.lang.String quotaUser) { return (ListUsable) super.setQuotaUser(quotaUser); } @Override public ListUsable setUploadType(java.lang.String uploadType) { return (ListUsable) super.setUploadType(uploadType); } @Override public ListUsable setUploadProtocol(java.lang.String uploadProtocol) { return (ListUsable) super.setUploadProtocol(uploadProtocol); } @Override public ListUsable setUserIp(java.lang.String userIp) { return (ListUsable) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListUsable setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListUsable setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListUsable setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListUsable setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListUsable setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListUsable setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListUsable set(String parameterName, Object value) { return (ListUsable) super.set(parameterName, value); } } /** * Patches the specified BackendService resource with the data included in the request. For more * information, see Backend services overview. This method supports PATCH semantics and uses the * JSON merge patch format and processing rules. * * Create a request for the method "backendServices.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param backendService Name of the BackendService resource to patch. * @param content the {@link com.google.api.services.compute.model.BackendService} * @return the request */ public Patch patch(java.lang.String project, java.lang.String backendService, com.google.api.services.compute.model.BackendService content) throws java.io.IOException { Patch result = new Patch(project, backendService, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendServices/{backendService}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern BACKEND_SERVICE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified BackendService resource with the data included in the request. For more * information, see Backend services overview. This method supports PATCH semantics and uses the * JSON merge patch format and processing rules. * * Create a request for the method "backendServices.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param backendService Name of the BackendService resource to patch. * @param content the {@link com.google.api.services.compute.model.BackendService} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String backendService, com.google.api.services.compute.model.BackendService content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendService = com.google.api.client.util.Preconditions.checkNotNull(backendService, "Required parameter backendService must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the BackendService resource to patch. */ @com.google.api.client.util.Key private java.lang.String backendService; /** Name of the BackendService resource to patch. */ public java.lang.String getBackendService() { return backendService; } /** Name of the BackendService resource to patch. */ public Patch setBackendService(java.lang.String backendService) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.backendService = backendService; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Sets the edge security policy for the specified backend service. * * Create a request for the method "backendServices.setEdgeSecurityPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetEdgeSecurityPolicy#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param backendService Name of the BackendService resource to which the edge security policy should be set. The name should * conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyReference} * @return the request */ public SetEdgeSecurityPolicy setEdgeSecurityPolicy(java.lang.String project, java.lang.String backendService, com.google.api.services.compute.model.SecurityPolicyReference content) throws java.io.IOException { SetEdgeSecurityPolicy result = new SetEdgeSecurityPolicy(project, backendService, content); initialize(result); return result; } public class SetEdgeSecurityPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Sets the edge security policy for the specified backend service. * * Create a request for the method "backendServices.setEdgeSecurityPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetEdgeSecurityPolicy#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param backendService Name of the BackendService resource to which the edge security policy should be set. The name should * conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyReference} * @since 1.13 */ protected SetEdgeSecurityPolicy(java.lang.String project, java.lang.String backendService, com.google.api.services.compute.model.SecurityPolicyReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendService = com.google.api.client.util.Preconditions.checkNotNull(backendService, "Required parameter backendService must be specified."); } @Override public SetEdgeSecurityPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetEdgeSecurityPolicy) super.set$Xgafv($Xgafv); } @Override public SetEdgeSecurityPolicy setAccessToken(java.lang.String accessToken) { return (SetEdgeSecurityPolicy) super.setAccessToken(accessToken); } @Override public SetEdgeSecurityPolicy setAlt(java.lang.String alt) { return (SetEdgeSecurityPolicy) super.setAlt(alt); } @Override public SetEdgeSecurityPolicy setCallback(java.lang.String callback) { return (SetEdgeSecurityPolicy) super.setCallback(callback); } @Override public SetEdgeSecurityPolicy setFields(java.lang.String fields) { return (SetEdgeSecurityPolicy) super.setFields(fields); } @Override public SetEdgeSecurityPolicy setKey(java.lang.String key) { return (SetEdgeSecurityPolicy) super.setKey(key); } @Override public SetEdgeSecurityPolicy setOauthToken(java.lang.String oauthToken) { return (SetEdgeSecurityPolicy) super.setOauthToken(oauthToken); } @Override public SetEdgeSecurityPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetEdgeSecurityPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetEdgeSecurityPolicy setQuotaUser(java.lang.String quotaUser) { return (SetEdgeSecurityPolicy) super.setQuotaUser(quotaUser); } @Override public SetEdgeSecurityPolicy setUploadType(java.lang.String uploadType) { return (SetEdgeSecurityPolicy) super.setUploadType(uploadType); } @Override public SetEdgeSecurityPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetEdgeSecurityPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetEdgeSecurityPolicy setUserIp(java.lang.String userIp) { return (SetEdgeSecurityPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetEdgeSecurityPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the BackendService resource to which the edge security policy should be set. The * name should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String backendService; /** Name of the BackendService resource to which the edge security policy should be set. The name should conform to RFC1035. */ public java.lang.String getBackendService() { return backendService; } /** * Name of the BackendService resource to which the edge security policy should be set. The * name should conform to RFC1035. */ public SetEdgeSecurityPolicy setBackendService(java.lang.String backendService) { this.backendService = backendService; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetEdgeSecurityPolicy setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetEdgeSecurityPolicy set(String parameterName, Object value) { return (SetEdgeSecurityPolicy) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "backendServices.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendServices/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "backendServices.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Sets the Google Cloud Armor security policy for the specified backend service. For more * information, see Google Cloud Armor Overview * * Create a request for the method "backendServices.setSecurityPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetSecurityPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param backendService Name of the BackendService resource to which the security policy should be set. The name should * conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyReference} * @return the request */ public SetSecurityPolicy setSecurityPolicy(java.lang.String project, java.lang.String backendService, com.google.api.services.compute.model.SecurityPolicyReference content) throws java.io.IOException { SetSecurityPolicy result = new SetSecurityPolicy(project, backendService, content); initialize(result); return result; } public class SetSecurityPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Sets the Google Cloud Armor security policy for the specified backend service. For more * information, see Google Cloud Armor Overview * * Create a request for the method "backendServices.setSecurityPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetSecurityPolicy#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param backendService Name of the BackendService resource to which the security policy should be set. The name should * conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyReference} * @since 1.13 */ protected SetSecurityPolicy(java.lang.String project, java.lang.String backendService, com.google.api.services.compute.model.SecurityPolicyReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendService = com.google.api.client.util.Preconditions.checkNotNull(backendService, "Required parameter backendService must be specified."); } @Override public SetSecurityPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetSecurityPolicy) super.set$Xgafv($Xgafv); } @Override public SetSecurityPolicy setAccessToken(java.lang.String accessToken) { return (SetSecurityPolicy) super.setAccessToken(accessToken); } @Override public SetSecurityPolicy setAlt(java.lang.String alt) { return (SetSecurityPolicy) super.setAlt(alt); } @Override public SetSecurityPolicy setCallback(java.lang.String callback) { return (SetSecurityPolicy) super.setCallback(callback); } @Override public SetSecurityPolicy setFields(java.lang.String fields) { return (SetSecurityPolicy) super.setFields(fields); } @Override public SetSecurityPolicy setKey(java.lang.String key) { return (SetSecurityPolicy) super.setKey(key); } @Override public SetSecurityPolicy setOauthToken(java.lang.String oauthToken) { return (SetSecurityPolicy) super.setOauthToken(oauthToken); } @Override public SetSecurityPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetSecurityPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetSecurityPolicy setQuotaUser(java.lang.String quotaUser) { return (SetSecurityPolicy) super.setQuotaUser(quotaUser); } @Override public SetSecurityPolicy setUploadType(java.lang.String uploadType) { return (SetSecurityPolicy) super.setUploadType(uploadType); } @Override public SetSecurityPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetSecurityPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetSecurityPolicy setUserIp(java.lang.String userIp) { return (SetSecurityPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetSecurityPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the BackendService resource to which the security policy should be set. The name * should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String backendService; /** Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035. */ public java.lang.String getBackendService() { return backendService; } /** * Name of the BackendService resource to which the security policy should be set. The name * should conform to RFC1035. */ public SetSecurityPolicy setBackendService(java.lang.String backendService) { this.backendService = backendService; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetSecurityPolicy setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetSecurityPolicy set(String parameterName, Object value) { return (SetSecurityPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "backendServices.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendServices/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "backendServices.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } /** * Updates the specified BackendService resource with the data included in the request. For more * information, see Backend services overview. * * Create a request for the method "backendServices.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param backendService Name of the BackendService resource to update. * @param content the {@link com.google.api.services.compute.model.BackendService} * @return the request */ public Update update(java.lang.String project, java.lang.String backendService, com.google.api.services.compute.model.BackendService content) throws java.io.IOException { Update result = new Update(project, backendService, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/backendServices/{backendService}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern BACKEND_SERVICE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified BackendService resource with the data included in the request. For more * information, see Backend services overview. * * Create a request for the method "backendServices.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param backendService Name of the BackendService resource to update. * @param content the {@link com.google.api.services.compute.model.BackendService} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String backendService, com.google.api.services.compute.model.BackendService content) { super(Compute.this, "PUT", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.backendService = com.google.api.client.util.Preconditions.checkNotNull(backendService, "Required parameter backendService must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the BackendService resource to update. */ @com.google.api.client.util.Key private java.lang.String backendService; /** Name of the BackendService resource to update. */ public java.lang.String getBackendService() { return backendService; } /** Name of the BackendService resource to update. */ public Update setBackendService(java.lang.String backendService) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.backendService = backendService; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the DiskTypes collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.DiskTypes.List request = compute.diskTypes().list(parameters ...)}
   * 
* * @return the resource collection */ public DiskTypes diskTypes() { return new DiskTypes(); } /** * The "diskTypes" collection of methods. */ public class DiskTypes { /** * Retrieves an aggregated list of disk types. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "diskTypes.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/diskTypes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of disk types. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "diskTypes.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.DiskTypeAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Returns the specified disk type. * * Create a request for the method "diskTypes.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param diskType Name of the disk type to return. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String diskType) throws java.io.IOException { Get result = new Get(project, zone, diskType); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/diskTypes/{diskType}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_TYPE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified disk type. * * Create a request for the method "diskTypes.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param diskType Name of the disk type to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String diskType) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.DiskType.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.diskType = com.google.api.client.util.Preconditions.checkNotNull(diskType, "Required parameter diskType must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_TYPE_PATTERN.matcher(diskType).matches(), "Parameter diskType must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the disk type to return. */ @com.google.api.client.util.Key private java.lang.String diskType; /** Name of the disk type to return. */ public java.lang.String getDiskType() { return diskType; } /** Name of the disk type to return. */ public Get setDiskType(java.lang.String diskType) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_TYPE_PATTERN.matcher(diskType).matches(), "Parameter diskType must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.diskType = diskType; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves a list of disk types available to the specified project. * * Create a request for the method "diskTypes.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/diskTypes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of disk types available to the specified project. * * Create a request for the method "diskTypes.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.DiskTypeList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public List setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Disks collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Disks.List request = compute.disks().list(parameters ...)}
   * 
* * @return the resource collection */ public Disks disks() { return new Disks(); } /** * The "disks" collection of methods. */ public class Disks { /** * Adds existing resource policies to a disk. You can only add one policy which will be applied to * this disk for scheduling snapshot creation. * * Create a request for the method "disks.addResourcePolicies". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddResourcePolicies#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk The disk name for this request. * @param content the {@link com.google.api.services.compute.model.DisksAddResourcePoliciesRequest} * @return the request */ public AddResourcePolicies addResourcePolicies(java.lang.String project, java.lang.String zone, java.lang.String disk, com.google.api.services.compute.model.DisksAddResourcePoliciesRequest content) throws java.io.IOException { AddResourcePolicies result = new AddResourcePolicies(project, zone, disk, content); initialize(result); return result; } public class AddResourcePolicies extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Adds existing resource policies to a disk. You can only add one policy which will be applied to * this disk for scheduling snapshot creation. * * Create a request for the method "disks.addResourcePolicies". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddResourcePolicies#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk The disk name for this request. * @param content the {@link com.google.api.services.compute.model.DisksAddResourcePoliciesRequest} * @since 1.13 */ protected AddResourcePolicies(java.lang.String project, java.lang.String zone, java.lang.String disk, com.google.api.services.compute.model.DisksAddResourcePoliciesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public AddResourcePolicies set$Xgafv(java.lang.String $Xgafv) { return (AddResourcePolicies) super.set$Xgafv($Xgafv); } @Override public AddResourcePolicies setAccessToken(java.lang.String accessToken) { return (AddResourcePolicies) super.setAccessToken(accessToken); } @Override public AddResourcePolicies setAlt(java.lang.String alt) { return (AddResourcePolicies) super.setAlt(alt); } @Override public AddResourcePolicies setCallback(java.lang.String callback) { return (AddResourcePolicies) super.setCallback(callback); } @Override public AddResourcePolicies setFields(java.lang.String fields) { return (AddResourcePolicies) super.setFields(fields); } @Override public AddResourcePolicies setKey(java.lang.String key) { return (AddResourcePolicies) super.setKey(key); } @Override public AddResourcePolicies setOauthToken(java.lang.String oauthToken) { return (AddResourcePolicies) super.setOauthToken(oauthToken); } @Override public AddResourcePolicies setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddResourcePolicies) super.setPrettyPrint(prettyPrint); } @Override public AddResourcePolicies setQuotaUser(java.lang.String quotaUser) { return (AddResourcePolicies) super.setQuotaUser(quotaUser); } @Override public AddResourcePolicies setUploadType(java.lang.String uploadType) { return (AddResourcePolicies) super.setUploadType(uploadType); } @Override public AddResourcePolicies setUploadProtocol(java.lang.String uploadProtocol) { return (AddResourcePolicies) super.setUploadProtocol(uploadProtocol); } @Override public AddResourcePolicies setUserIp(java.lang.String userIp) { return (AddResourcePolicies) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddResourcePolicies setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public AddResourcePolicies setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The disk name for this request. */ @com.google.api.client.util.Key private java.lang.String disk; /** The disk name for this request. */ public java.lang.String getDisk() { return disk; } /** The disk name for this request. */ public AddResourcePolicies setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddResourcePolicies setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddResourcePolicies set(String parameterName, Object value) { return (AddResourcePolicies) super.set(parameterName, value); } } /** * Retrieves an aggregated list of persistent disks. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "disks.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/disks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of persistent disks. To prevent failure, Google recommends that * you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "disks.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.DiskAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Bulk create a set of disks. * * Create a request for the method "disks.bulkInsert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link BulkInsert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.BulkInsertDiskResource} * @return the request */ public BulkInsert bulkInsert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.BulkInsertDiskResource content) throws java.io.IOException { BulkInsert result = new BulkInsert(project, zone, content); initialize(result); return result; } public class BulkInsert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks/bulkInsert"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Bulk create a set of disks. * * Create a request for the method "disks.bulkInsert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link BulkInsert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.BulkInsertDiskResource} * @since 1.13 */ protected BulkInsert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.BulkInsertDiskResource content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public BulkInsert set$Xgafv(java.lang.String $Xgafv) { return (BulkInsert) super.set$Xgafv($Xgafv); } @Override public BulkInsert setAccessToken(java.lang.String accessToken) { return (BulkInsert) super.setAccessToken(accessToken); } @Override public BulkInsert setAlt(java.lang.String alt) { return (BulkInsert) super.setAlt(alt); } @Override public BulkInsert setCallback(java.lang.String callback) { return (BulkInsert) super.setCallback(callback); } @Override public BulkInsert setFields(java.lang.String fields) { return (BulkInsert) super.setFields(fields); } @Override public BulkInsert setKey(java.lang.String key) { return (BulkInsert) super.setKey(key); } @Override public BulkInsert setOauthToken(java.lang.String oauthToken) { return (BulkInsert) super.setOauthToken(oauthToken); } @Override public BulkInsert setPrettyPrint(java.lang.Boolean prettyPrint) { return (BulkInsert) super.setPrettyPrint(prettyPrint); } @Override public BulkInsert setQuotaUser(java.lang.String quotaUser) { return (BulkInsert) super.setQuotaUser(quotaUser); } @Override public BulkInsert setUploadType(java.lang.String uploadType) { return (BulkInsert) super.setUploadType(uploadType); } @Override public BulkInsert setUploadProtocol(java.lang.String uploadProtocol) { return (BulkInsert) super.setUploadProtocol(uploadProtocol); } @Override public BulkInsert setUserIp(java.lang.String userIp) { return (BulkInsert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public BulkInsert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public BulkInsert setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public BulkInsert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public BulkInsert set(String parameterName, Object value) { return (BulkInsert) super.set(parameterName, value); } } /** * Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using * snapshots.insert instead, as that method supports more features, such as creating snapshots in a * project different from the source disk project. * * Create a request for the method "disks.createSnapshot". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link CreateSnapshot#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk Name of the persistent disk to snapshot. * @param content the {@link com.google.api.services.compute.model.Snapshot} * @return the request */ public CreateSnapshot createSnapshot(java.lang.String project, java.lang.String zone, java.lang.String disk, com.google.api.services.compute.model.Snapshot content) throws java.io.IOException { CreateSnapshot result = new CreateSnapshot(project, zone, disk, content); initialize(result); return result; } public class CreateSnapshot extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider * using snapshots.insert instead, as that method supports more features, such as creating * snapshots in a project different from the source disk project. * * Create a request for the method "disks.createSnapshot". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link CreateSnapshot#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk Name of the persistent disk to snapshot. * @param content the {@link com.google.api.services.compute.model.Snapshot} * @since 1.13 */ protected CreateSnapshot(java.lang.String project, java.lang.String zone, java.lang.String disk, com.google.api.services.compute.model.Snapshot content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public CreateSnapshot set$Xgafv(java.lang.String $Xgafv) { return (CreateSnapshot) super.set$Xgafv($Xgafv); } @Override public CreateSnapshot setAccessToken(java.lang.String accessToken) { return (CreateSnapshot) super.setAccessToken(accessToken); } @Override public CreateSnapshot setAlt(java.lang.String alt) { return (CreateSnapshot) super.setAlt(alt); } @Override public CreateSnapshot setCallback(java.lang.String callback) { return (CreateSnapshot) super.setCallback(callback); } @Override public CreateSnapshot setFields(java.lang.String fields) { return (CreateSnapshot) super.setFields(fields); } @Override public CreateSnapshot setKey(java.lang.String key) { return (CreateSnapshot) super.setKey(key); } @Override public CreateSnapshot setOauthToken(java.lang.String oauthToken) { return (CreateSnapshot) super.setOauthToken(oauthToken); } @Override public CreateSnapshot setPrettyPrint(java.lang.Boolean prettyPrint) { return (CreateSnapshot) super.setPrettyPrint(prettyPrint); } @Override public CreateSnapshot setQuotaUser(java.lang.String quotaUser) { return (CreateSnapshot) super.setQuotaUser(quotaUser); } @Override public CreateSnapshot setUploadType(java.lang.String uploadType) { return (CreateSnapshot) super.setUploadType(uploadType); } @Override public CreateSnapshot setUploadProtocol(java.lang.String uploadProtocol) { return (CreateSnapshot) super.setUploadProtocol(uploadProtocol); } @Override public CreateSnapshot setUserIp(java.lang.String userIp) { return (CreateSnapshot) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public CreateSnapshot setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public CreateSnapshot setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the persistent disk to snapshot. */ @com.google.api.client.util.Key private java.lang.String disk; /** Name of the persistent disk to snapshot. */ public java.lang.String getDisk() { return disk; } /** Name of the persistent disk to snapshot. */ public CreateSnapshot setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } /** * [Input Only] Whether to attempt an application consistent snapshot by informing the OS to * prepare for the snapshot process. */ @com.google.api.client.util.Key private java.lang.Boolean guestFlush; /**[ Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare [ for the snapshot process. [ */ public java.lang.Boolean getGuestFlush() { return guestFlush; } /** * [Input Only] Whether to attempt an application consistent snapshot by informing the OS to * prepare for the snapshot process. */ public CreateSnapshot setGuestFlush(java.lang.Boolean guestFlush) { this.guestFlush = guestFlush; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public CreateSnapshot setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public CreateSnapshot set(String parameterName, Object value) { return (CreateSnapshot) super.set(parameterName, value); } } /** * Deletes the specified persistent disk. Deleting a disk removes its data permanently and is * irreversible. However, deleting a disk does not delete any snapshots previously made from the * disk. You must separately delete snapshots. * * Create a request for the method "disks.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk Name of the persistent disk to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String zone, java.lang.String disk) throws java.io.IOException { Delete result = new Delete(project, zone, disk); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks/{disk}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Deletes the specified persistent disk. Deleting a disk removes its data permanently and is * irreversible. However, deleting a disk does not delete any snapshots previously made from the * disk. You must separately delete snapshots. * * Create a request for the method "disks.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param disk Name of the persistent disk to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String zone, java.lang.String disk) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Delete setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the persistent disk to delete. */ @com.google.api.client.util.Key private java.lang.String disk; /** Name of the persistent disk to delete. */ public java.lang.String getDisk() { return disk; } /** Name of the persistent disk to delete. */ public Delete setDisk(java.lang.String disk) { this.disk = disk; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified persistent disk. * * Create a request for the method "disks.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk Name of the persistent disk to return. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String disk) throws java.io.IOException { Get result = new Get(project, zone, disk); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks/{disk}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified persistent disk. * * Create a request for the method "disks.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param disk Name of the persistent disk to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String disk) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Disk.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the persistent disk to return. */ @com.google.api.client.util.Key private java.lang.String disk; /** Name of the persistent disk to return. */ public java.lang.String getDisk() { return disk; } /** Name of the persistent disk to return. */ public Get setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "disks.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, zone, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "disks.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public GetIamPolicy setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a persistent disk in the specified project using the data in the request. You can create * a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data * disk by omitting all properties. You can also create a disk that is larger than the default size * by specifying the sizeGb property. * * Create a request for the method "disks.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.Disk} * @return the request */ public Insert insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.Disk content) throws java.io.IOException { Insert result = new Insert(project, zone, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a persistent disk in the specified project using the data in the request. You can * create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 * GB data disk by omitting all properties. You can also create a disk that is larger than the * default size by specifying the sizeGb property. * * Create a request for the method "disks.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.Disk} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.Disk content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Insert setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** Source image to restore onto a disk. This field is optional. */ @com.google.api.client.util.Key private java.lang.String sourceImage; /** Source image to restore onto a disk. This field is optional. */ public java.lang.String getSourceImage() { return sourceImage; } /** Source image to restore onto a disk. This field is optional. */ public Insert setSourceImage(java.lang.String sourceImage) { this.sourceImage = sourceImage; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of persistent disks contained within the specified zone. * * Create a request for the method "disks.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of persistent disks contained within the specified zone. * * Create a request for the method "disks.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.DiskList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public List setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Removes resource policies from a disk. * * Create a request for the method "disks.removeResourcePolicies". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RemoveResourcePolicies#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk The disk name for this request. * @param content the {@link com.google.api.services.compute.model.DisksRemoveResourcePoliciesRequest} * @return the request */ public RemoveResourcePolicies removeResourcePolicies(java.lang.String project, java.lang.String zone, java.lang.String disk, com.google.api.services.compute.model.DisksRemoveResourcePoliciesRequest content) throws java.io.IOException { RemoveResourcePolicies result = new RemoveResourcePolicies(project, zone, disk, content); initialize(result); return result; } public class RemoveResourcePolicies extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Removes resource policies from a disk. * * Create a request for the method "disks.removeResourcePolicies". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RemoveResourcePolicies#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk The disk name for this request. * @param content the {@link com.google.api.services.compute.model.DisksRemoveResourcePoliciesRequest} * @since 1.13 */ protected RemoveResourcePolicies(java.lang.String project, java.lang.String zone, java.lang.String disk, com.google.api.services.compute.model.DisksRemoveResourcePoliciesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public RemoveResourcePolicies set$Xgafv(java.lang.String $Xgafv) { return (RemoveResourcePolicies) super.set$Xgafv($Xgafv); } @Override public RemoveResourcePolicies setAccessToken(java.lang.String accessToken) { return (RemoveResourcePolicies) super.setAccessToken(accessToken); } @Override public RemoveResourcePolicies setAlt(java.lang.String alt) { return (RemoveResourcePolicies) super.setAlt(alt); } @Override public RemoveResourcePolicies setCallback(java.lang.String callback) { return (RemoveResourcePolicies) super.setCallback(callback); } @Override public RemoveResourcePolicies setFields(java.lang.String fields) { return (RemoveResourcePolicies) super.setFields(fields); } @Override public RemoveResourcePolicies setKey(java.lang.String key) { return (RemoveResourcePolicies) super.setKey(key); } @Override public RemoveResourcePolicies setOauthToken(java.lang.String oauthToken) { return (RemoveResourcePolicies) super.setOauthToken(oauthToken); } @Override public RemoveResourcePolicies setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveResourcePolicies) super.setPrettyPrint(prettyPrint); } @Override public RemoveResourcePolicies setQuotaUser(java.lang.String quotaUser) { return (RemoveResourcePolicies) super.setQuotaUser(quotaUser); } @Override public RemoveResourcePolicies setUploadType(java.lang.String uploadType) { return (RemoveResourcePolicies) super.setUploadType(uploadType); } @Override public RemoveResourcePolicies setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveResourcePolicies) super.setUploadProtocol(uploadProtocol); } @Override public RemoveResourcePolicies setUserIp(java.lang.String userIp) { return (RemoveResourcePolicies) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public RemoveResourcePolicies setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public RemoveResourcePolicies setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The disk name for this request. */ @com.google.api.client.util.Key private java.lang.String disk; /** The disk name for this request. */ public java.lang.String getDisk() { return disk; } /** The disk name for this request. */ public RemoveResourcePolicies setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public RemoveResourcePolicies setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public RemoveResourcePolicies set(String parameterName, Object value) { return (RemoveResourcePolicies) super.set(parameterName, value); } } /** * Resizes the specified persistent disk. You can only increase the size of the disk. * * Create a request for the method "disks.resize". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Resize#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk The name of the persistent disk. * @param content the {@link com.google.api.services.compute.model.DisksResizeRequest} * @return the request */ public Resize resize(java.lang.String project, java.lang.String zone, java.lang.String disk, com.google.api.services.compute.model.DisksResizeRequest content) throws java.io.IOException { Resize result = new Resize(project, zone, disk, content); initialize(result); return result; } public class Resize extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks/{disk}/resize"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Resizes the specified persistent disk. You can only increase the size of the disk. * * Create a request for the method "disks.resize". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Resize#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk The name of the persistent disk. * @param content the {@link com.google.api.services.compute.model.DisksResizeRequest} * @since 1.13 */ protected Resize(java.lang.String project, java.lang.String zone, java.lang.String disk, com.google.api.services.compute.model.DisksResizeRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Resize set$Xgafv(java.lang.String $Xgafv) { return (Resize) super.set$Xgafv($Xgafv); } @Override public Resize setAccessToken(java.lang.String accessToken) { return (Resize) super.setAccessToken(accessToken); } @Override public Resize setAlt(java.lang.String alt) { return (Resize) super.setAlt(alt); } @Override public Resize setCallback(java.lang.String callback) { return (Resize) super.setCallback(callback); } @Override public Resize setFields(java.lang.String fields) { return (Resize) super.setFields(fields); } @Override public Resize setKey(java.lang.String key) { return (Resize) super.setKey(key); } @Override public Resize setOauthToken(java.lang.String oauthToken) { return (Resize) super.setOauthToken(oauthToken); } @Override public Resize setPrettyPrint(java.lang.Boolean prettyPrint) { return (Resize) super.setPrettyPrint(prettyPrint); } @Override public Resize setQuotaUser(java.lang.String quotaUser) { return (Resize) super.setQuotaUser(quotaUser); } @Override public Resize setUploadType(java.lang.String uploadType) { return (Resize) super.setUploadType(uploadType); } @Override public Resize setUploadProtocol(java.lang.String uploadProtocol) { return (Resize) super.setUploadProtocol(uploadProtocol); } @Override public Resize setUserIp(java.lang.String userIp) { return (Resize) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Resize setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Resize setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The name of the persistent disk. */ @com.google.api.client.util.Key private java.lang.String disk; /** The name of the persistent disk. */ public java.lang.String getDisk() { return disk; } /** The name of the persistent disk. */ public Resize setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Resize setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Resize set(String parameterName, Object value) { return (Resize) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "disks.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, zone, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "disks.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetIamPolicy setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation. * * Create a request for the method "disks.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, zone, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on a disk. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "disks.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetLabels setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetLabels setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } /** * Starts asynchronous replication. Must be invoked on the primary disk. * * Create a request for the method "disks.startAsyncReplication". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link StartAsyncReplication#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk The name of the persistent disk. * @param content the {@link com.google.api.services.compute.model.DisksStartAsyncReplicationRequest} * @return the request */ public StartAsyncReplication startAsyncReplication(java.lang.String project, java.lang.String zone, java.lang.String disk, com.google.api.services.compute.model.DisksStartAsyncReplicationRequest content) throws java.io.IOException { StartAsyncReplication result = new StartAsyncReplication(project, zone, disk, content); initialize(result); return result; } public class StartAsyncReplication extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Starts asynchronous replication. Must be invoked on the primary disk. * * Create a request for the method "disks.startAsyncReplication". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link StartAsyncReplication#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk The name of the persistent disk. * @param content the {@link com.google.api.services.compute.model.DisksStartAsyncReplicationRequest} * @since 1.13 */ protected StartAsyncReplication(java.lang.String project, java.lang.String zone, java.lang.String disk, com.google.api.services.compute.model.DisksStartAsyncReplicationRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public StartAsyncReplication set$Xgafv(java.lang.String $Xgafv) { return (StartAsyncReplication) super.set$Xgafv($Xgafv); } @Override public StartAsyncReplication setAccessToken(java.lang.String accessToken) { return (StartAsyncReplication) super.setAccessToken(accessToken); } @Override public StartAsyncReplication setAlt(java.lang.String alt) { return (StartAsyncReplication) super.setAlt(alt); } @Override public StartAsyncReplication setCallback(java.lang.String callback) { return (StartAsyncReplication) super.setCallback(callback); } @Override public StartAsyncReplication setFields(java.lang.String fields) { return (StartAsyncReplication) super.setFields(fields); } @Override public StartAsyncReplication setKey(java.lang.String key) { return (StartAsyncReplication) super.setKey(key); } @Override public StartAsyncReplication setOauthToken(java.lang.String oauthToken) { return (StartAsyncReplication) super.setOauthToken(oauthToken); } @Override public StartAsyncReplication setPrettyPrint(java.lang.Boolean prettyPrint) { return (StartAsyncReplication) super.setPrettyPrint(prettyPrint); } @Override public StartAsyncReplication setQuotaUser(java.lang.String quotaUser) { return (StartAsyncReplication) super.setQuotaUser(quotaUser); } @Override public StartAsyncReplication setUploadType(java.lang.String uploadType) { return (StartAsyncReplication) super.setUploadType(uploadType); } @Override public StartAsyncReplication setUploadProtocol(java.lang.String uploadProtocol) { return (StartAsyncReplication) super.setUploadProtocol(uploadProtocol); } @Override public StartAsyncReplication setUserIp(java.lang.String userIp) { return (StartAsyncReplication) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public StartAsyncReplication setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public StartAsyncReplication setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The name of the persistent disk. */ @com.google.api.client.util.Key private java.lang.String disk; /** The name of the persistent disk. */ public java.lang.String getDisk() { return disk; } /** The name of the persistent disk. */ public StartAsyncReplication setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public StartAsyncReplication setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public StartAsyncReplication set(String parameterName, Object value) { return (StartAsyncReplication) super.set(parameterName, value); } } /** * Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk. * * Create a request for the method "disks.stopAsyncReplication". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link StopAsyncReplication#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk The name of the persistent disk. * @return the request */ public StopAsyncReplication stopAsyncReplication(java.lang.String project, java.lang.String zone, java.lang.String disk) throws java.io.IOException { StopAsyncReplication result = new StopAsyncReplication(project, zone, disk); initialize(result); return result; } public class StopAsyncReplication extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk. * * Create a request for the method "disks.stopAsyncReplication". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link StopAsyncReplication#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk The name of the persistent disk. * @since 1.13 */ protected StopAsyncReplication(java.lang.String project, java.lang.String zone, java.lang.String disk) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public StopAsyncReplication set$Xgafv(java.lang.String $Xgafv) { return (StopAsyncReplication) super.set$Xgafv($Xgafv); } @Override public StopAsyncReplication setAccessToken(java.lang.String accessToken) { return (StopAsyncReplication) super.setAccessToken(accessToken); } @Override public StopAsyncReplication setAlt(java.lang.String alt) { return (StopAsyncReplication) super.setAlt(alt); } @Override public StopAsyncReplication setCallback(java.lang.String callback) { return (StopAsyncReplication) super.setCallback(callback); } @Override public StopAsyncReplication setFields(java.lang.String fields) { return (StopAsyncReplication) super.setFields(fields); } @Override public StopAsyncReplication setKey(java.lang.String key) { return (StopAsyncReplication) super.setKey(key); } @Override public StopAsyncReplication setOauthToken(java.lang.String oauthToken) { return (StopAsyncReplication) super.setOauthToken(oauthToken); } @Override public StopAsyncReplication setPrettyPrint(java.lang.Boolean prettyPrint) { return (StopAsyncReplication) super.setPrettyPrint(prettyPrint); } @Override public StopAsyncReplication setQuotaUser(java.lang.String quotaUser) { return (StopAsyncReplication) super.setQuotaUser(quotaUser); } @Override public StopAsyncReplication setUploadType(java.lang.String uploadType) { return (StopAsyncReplication) super.setUploadType(uploadType); } @Override public StopAsyncReplication setUploadProtocol(java.lang.String uploadProtocol) { return (StopAsyncReplication) super.setUploadProtocol(uploadProtocol); } @Override public StopAsyncReplication setUserIp(java.lang.String userIp) { return (StopAsyncReplication) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public StopAsyncReplication setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public StopAsyncReplication setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The name of the persistent disk. */ @com.google.api.client.util.Key private java.lang.String disk; /** The name of the persistent disk. */ public java.lang.String getDisk() { return disk; } /** The name of the persistent disk. */ public StopAsyncReplication setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public StopAsyncReplication setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public StopAsyncReplication set(String parameterName, Object value) { return (StopAsyncReplication) super.set(parameterName, value); } } /** * Stops asynchronous replication for a consistency group of disks. Can be invoked either in the * primary or secondary scope. * * Create a request for the method "disks.stopGroupAsyncReplication". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link StopGroupAsyncReplication#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. This must be the zone of the primary or secondary disks in * the consistency group. * @param content the {@link com.google.api.services.compute.model.DisksStopGroupAsyncReplicationResource} * @return the request */ public StopGroupAsyncReplication stopGroupAsyncReplication(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.DisksStopGroupAsyncReplicationResource content) throws java.io.IOException { StopGroupAsyncReplication result = new StopGroupAsyncReplication(project, zone, content); initialize(result); return result; } public class StopGroupAsyncReplication extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Stops asynchronous replication for a consistency group of disks. Can be invoked either in the * primary or secondary scope. * * Create a request for the method "disks.stopGroupAsyncReplication". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link StopGroupAsyncReplication#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. This must be the zone of the primary or secondary disks in * the consistency group. * @param content the {@link com.google.api.services.compute.model.DisksStopGroupAsyncReplicationResource} * @since 1.13 */ protected StopGroupAsyncReplication(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.DisksStopGroupAsyncReplicationResource content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public StopGroupAsyncReplication set$Xgafv(java.lang.String $Xgafv) { return (StopGroupAsyncReplication) super.set$Xgafv($Xgafv); } @Override public StopGroupAsyncReplication setAccessToken(java.lang.String accessToken) { return (StopGroupAsyncReplication) super.setAccessToken(accessToken); } @Override public StopGroupAsyncReplication setAlt(java.lang.String alt) { return (StopGroupAsyncReplication) super.setAlt(alt); } @Override public StopGroupAsyncReplication setCallback(java.lang.String callback) { return (StopGroupAsyncReplication) super.setCallback(callback); } @Override public StopGroupAsyncReplication setFields(java.lang.String fields) { return (StopGroupAsyncReplication) super.setFields(fields); } @Override public StopGroupAsyncReplication setKey(java.lang.String key) { return (StopGroupAsyncReplication) super.setKey(key); } @Override public StopGroupAsyncReplication setOauthToken(java.lang.String oauthToken) { return (StopGroupAsyncReplication) super.setOauthToken(oauthToken); } @Override public StopGroupAsyncReplication setPrettyPrint(java.lang.Boolean prettyPrint) { return (StopGroupAsyncReplication) super.setPrettyPrint(prettyPrint); } @Override public StopGroupAsyncReplication setQuotaUser(java.lang.String quotaUser) { return (StopGroupAsyncReplication) super.setQuotaUser(quotaUser); } @Override public StopGroupAsyncReplication setUploadType(java.lang.String uploadType) { return (StopGroupAsyncReplication) super.setUploadType(uploadType); } @Override public StopGroupAsyncReplication setUploadProtocol(java.lang.String uploadProtocol) { return (StopGroupAsyncReplication) super.setUploadProtocol(uploadProtocol); } @Override public StopGroupAsyncReplication setUserIp(java.lang.String userIp) { return (StopGroupAsyncReplication) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public StopGroupAsyncReplication setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone for this request. This must be the zone of the primary or secondary * disks in the consistency group. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. This must be the zone of the primary or secondary disks in the consistency group. */ public java.lang.String getZone() { return zone; } /** * The name of the zone for this request. This must be the zone of the primary or secondary * disks in the consistency group. */ public StopGroupAsyncReplication setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public StopGroupAsyncReplication setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public StopGroupAsyncReplication set(String parameterName, Object value) { return (StopGroupAsyncReplication) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "disks.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, zone, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "disks.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public TestIamPermissions setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } /** * Updates the specified disk with the data included in the request. The update is performed only on * selected fields included as part of update-mask. Only the following fields can be modified: * user_license. * * Create a request for the method "disks.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk The disk name for this request. * @param content the {@link com.google.api.services.compute.model.Disk} * @return the request */ public Update update(java.lang.String project, java.lang.String zone, java.lang.String disk, com.google.api.services.compute.model.Disk content) throws java.io.IOException { Update result = new Update(project, zone, disk, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/disks/{disk}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified disk with the data included in the request. The update is performed only * on selected fields included as part of update-mask. Only the following fields can be modified: * user_license. * * Create a request for the method "disks.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param disk The disk name for this request. * @param content the {@link com.google.api.services.compute.model.Disk} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String zone, java.lang.String disk, com.google.api.services.compute.model.Disk content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Update setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The disk name for this request. */ @com.google.api.client.util.Key private java.lang.String disk; /** The disk name for this request. */ public java.lang.String getDisk() { return disk; } /** The disk name for this request. */ public Update setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } @com.google.api.client.util.Key private java.util.List paths; /** */ public java.util.List getPaths() { return paths; } public Update setPaths(java.util.List paths) { this.paths = paths; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** update_mask indicates fields to be updated as part of this request. */ @com.google.api.client.util.Key private String updateMask; /** update_mask indicates fields to be updated as part of this request. */ public String getUpdateMask() { return updateMask; } /** update_mask indicates fields to be updated as part of this request. */ public Update setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the ExternalVpnGateways collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.ExternalVpnGateways.List request = compute.externalVpnGateways().list(parameters ...)}
   * 
* * @return the resource collection */ public ExternalVpnGateways externalVpnGateways() { return new ExternalVpnGateways(); } /** * The "externalVpnGateways" collection of methods. */ public class ExternalVpnGateways { /** * Deletes the specified externalVpnGateway. * * Create a request for the method "externalVpnGateways.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param externalVpnGateway Name of the externalVpnGateways to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String externalVpnGateway) throws java.io.IOException { Delete result = new Delete(project, externalVpnGateway); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/externalVpnGateways/{externalVpnGateway}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern EXTERNAL_VPN_GATEWAY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Deletes the specified externalVpnGateway. * * Create a request for the method "externalVpnGateways.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param externalVpnGateway Name of the externalVpnGateways to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String externalVpnGateway) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.externalVpnGateway = com.google.api.client.util.Preconditions.checkNotNull(externalVpnGateway, "Required parameter externalVpnGateway must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(EXTERNAL_VPN_GATEWAY_PATTERN.matcher(externalVpnGateway).matches(), "Parameter externalVpnGateway must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the externalVpnGateways to delete. */ @com.google.api.client.util.Key private java.lang.String externalVpnGateway; /** Name of the externalVpnGateways to delete. */ public java.lang.String getExternalVpnGateway() { return externalVpnGateway; } /** Name of the externalVpnGateways to delete. */ public Delete setExternalVpnGateway(java.lang.String externalVpnGateway) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(EXTERNAL_VPN_GATEWAY_PATTERN.matcher(externalVpnGateway).matches(), "Parameter externalVpnGateway must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.externalVpnGateway = externalVpnGateway; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a * list() request. * * Create a request for the method "externalVpnGateways.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param externalVpnGateway Name of the externalVpnGateway to return. * @return the request */ public Get get(java.lang.String project, java.lang.String externalVpnGateway) throws java.io.IOException { Get result = new Get(project, externalVpnGateway); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/externalVpnGateways/{externalVpnGateway}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern EXTERNAL_VPN_GATEWAY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making * a list() request. * * Create a request for the method "externalVpnGateways.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param externalVpnGateway Name of the externalVpnGateway to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String externalVpnGateway) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ExternalVpnGateway.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.externalVpnGateway = com.google.api.client.util.Preconditions.checkNotNull(externalVpnGateway, "Required parameter externalVpnGateway must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(EXTERNAL_VPN_GATEWAY_PATTERN.matcher(externalVpnGateway).matches(), "Parameter externalVpnGateway must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the externalVpnGateway to return. */ @com.google.api.client.util.Key private java.lang.String externalVpnGateway; /** Name of the externalVpnGateway to return. */ public java.lang.String getExternalVpnGateway() { return externalVpnGateway; } /** Name of the externalVpnGateway to return. */ public Get setExternalVpnGateway(java.lang.String externalVpnGateway) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(EXTERNAL_VPN_GATEWAY_PATTERN.matcher(externalVpnGateway).matches(), "Parameter externalVpnGateway must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.externalVpnGateway = externalVpnGateway; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a ExternalVpnGateway in the specified project using the data included in the request. * * Create a request for the method "externalVpnGateways.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.ExternalVpnGateway} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.ExternalVpnGateway content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/externalVpnGateways"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a ExternalVpnGateway in the specified project using the data included in the request. * * Create a request for the method "externalVpnGateways.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.ExternalVpnGateway} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.ExternalVpnGateway content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of ExternalVpnGateway available to the specified project. * * Create a request for the method "externalVpnGateways.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/externalVpnGateways"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of ExternalVpnGateway available to the specified project. * * Create a request for the method "externalVpnGateways.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ExternalVpnGatewayList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "externalVpnGateways.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/externalVpnGateways/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling * Resources documentation. * * Create a request for the method "externalVpnGateways.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "externalVpnGateways.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "externalVpnGateways.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the FirewallPolicies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.FirewallPolicies.List request = compute.firewallPolicies().list(parameters ...)}
   * 
* * @return the resource collection */ public FirewallPolicies firewallPolicies() { return new FirewallPolicies(); } /** * The "firewallPolicies" collection of methods. */ public class FirewallPolicies { /** * Inserts an association for the specified firewall policy. * * Create a request for the method "firewallPolicies.addAssociation". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddAssociation#execute()} method to invoke the remote operation. * * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyAssociation} * @return the request */ public AddAssociation addAssociation(java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyAssociation content) throws java.io.IOException { AddAssociation result = new AddAssociation(firewallPolicy, content); initialize(result); return result; } public class AddAssociation extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/{firewallPolicy}/addAssociation"; private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("(firewallPolicies/)?[0-9]{0,20}"); /** * Inserts an association for the specified firewall policy. * * Create a request for the method "firewallPolicies.addAssociation". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddAssociation#execute()} method to invoke the remote operation. *

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

* * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyAssociation} * @since 1.13 */ protected AddAssociation(java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyAssociation content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } } @Override public AddAssociation set$Xgafv(java.lang.String $Xgafv) { return (AddAssociation) super.set$Xgafv($Xgafv); } @Override public AddAssociation setAccessToken(java.lang.String accessToken) { return (AddAssociation) super.setAccessToken(accessToken); } @Override public AddAssociation setAlt(java.lang.String alt) { return (AddAssociation) super.setAlt(alt); } @Override public AddAssociation setCallback(java.lang.String callback) { return (AddAssociation) super.setCallback(callback); } @Override public AddAssociation setFields(java.lang.String fields) { return (AddAssociation) super.setFields(fields); } @Override public AddAssociation setKey(java.lang.String key) { return (AddAssociation) super.setKey(key); } @Override public AddAssociation setOauthToken(java.lang.String oauthToken) { return (AddAssociation) super.setOauthToken(oauthToken); } @Override public AddAssociation setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddAssociation) super.setPrettyPrint(prettyPrint); } @Override public AddAssociation setQuotaUser(java.lang.String quotaUser) { return (AddAssociation) super.setQuotaUser(quotaUser); } @Override public AddAssociation setUploadType(java.lang.String uploadType) { return (AddAssociation) super.setUploadType(uploadType); } @Override public AddAssociation setUploadProtocol(java.lang.String uploadProtocol) { return (AddAssociation) super.setUploadProtocol(uploadProtocol); } @Override public AddAssociation setUserIp(java.lang.String userIp) { return (AddAssociation) super.setUserIp(userIp); } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public AddAssociation setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } this.firewallPolicy = firewallPolicy; return this; } /** * Indicates whether or not to replace it if an association of the attachment already exists. * This is false by default, in which case an error will be returned if an association already * exists. */ @com.google.api.client.util.Key private java.lang.Boolean replaceExistingAssociation; /** Indicates whether or not to replace it if an association of the attachment already exists. This is false by default, in which case an error will be returned if an association already exists. */ public java.lang.Boolean getReplaceExistingAssociation() { return replaceExistingAssociation; } /** * Indicates whether or not to replace it if an association of the attachment already exists. * This is false by default, in which case an error will be returned if an association already * exists. */ public AddAssociation setReplaceExistingAssociation(java.lang.Boolean replaceExistingAssociation) { this.replaceExistingAssociation = replaceExistingAssociation; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddAssociation setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddAssociation set(String parameterName, Object value) { return (AddAssociation) super.set(parameterName, value); } } /** * Inserts a rule into a firewall policy. * * Create a request for the method "firewallPolicies.addRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddRule#execute()} method to invoke the remote operation. * * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyRule} * @return the request */ public AddRule addRule(java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyRule content) throws java.io.IOException { AddRule result = new AddRule(firewallPolicy, content); initialize(result); return result; } public class AddRule extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/{firewallPolicy}/addRule"; private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("(firewallPolicies/)?[0-9]{0,20}"); /** * Inserts a rule into a firewall policy. * * Create a request for the method "firewallPolicies.addRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddRule#execute()} method to invoke the remote operation.

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

* * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyRule} * @since 1.13 */ protected AddRule(java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyRule content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } } @Override public AddRule set$Xgafv(java.lang.String $Xgafv) { return (AddRule) super.set$Xgafv($Xgafv); } @Override public AddRule setAccessToken(java.lang.String accessToken) { return (AddRule) super.setAccessToken(accessToken); } @Override public AddRule setAlt(java.lang.String alt) { return (AddRule) super.setAlt(alt); } @Override public AddRule setCallback(java.lang.String callback) { return (AddRule) super.setCallback(callback); } @Override public AddRule setFields(java.lang.String fields) { return (AddRule) super.setFields(fields); } @Override public AddRule setKey(java.lang.String key) { return (AddRule) super.setKey(key); } @Override public AddRule setOauthToken(java.lang.String oauthToken) { return (AddRule) super.setOauthToken(oauthToken); } @Override public AddRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddRule) super.setPrettyPrint(prettyPrint); } @Override public AddRule setQuotaUser(java.lang.String quotaUser) { return (AddRule) super.setQuotaUser(quotaUser); } @Override public AddRule setUploadType(java.lang.String uploadType) { return (AddRule) super.setUploadType(uploadType); } @Override public AddRule setUploadProtocol(java.lang.String uploadProtocol) { return (AddRule) super.setUploadProtocol(uploadProtocol); } @Override public AddRule setUserIp(java.lang.String userIp) { return (AddRule) super.setUserIp(userIp); } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public AddRule setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } this.firewallPolicy = firewallPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddRule setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddRule set(String parameterName, Object value) { return (AddRule) super.set(parameterName, value); } } /** * Copies rules to the specified firewall policy. * * Create a request for the method "firewallPolicies.cloneRules". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link CloneRules#execute()} method to invoke the remote operation. * * @param firewallPolicy Name of the firewall policy to update. * @return the request */ public CloneRules cloneRules(java.lang.String firewallPolicy) throws java.io.IOException { CloneRules result = new CloneRules(firewallPolicy); initialize(result); return result; } public class CloneRules extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/{firewallPolicy}/cloneRules"; private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("(firewallPolicies/)?[0-9]{0,20}"); /** * Copies rules to the specified firewall policy. * * Create a request for the method "firewallPolicies.cloneRules". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link CloneRules#execute()} method to invoke the remote operation.

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

* * @param firewallPolicy Name of the firewall policy to update. * @since 1.13 */ protected CloneRules(java.lang.String firewallPolicy) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } } @Override public CloneRules set$Xgafv(java.lang.String $Xgafv) { return (CloneRules) super.set$Xgafv($Xgafv); } @Override public CloneRules setAccessToken(java.lang.String accessToken) { return (CloneRules) super.setAccessToken(accessToken); } @Override public CloneRules setAlt(java.lang.String alt) { return (CloneRules) super.setAlt(alt); } @Override public CloneRules setCallback(java.lang.String callback) { return (CloneRules) super.setCallback(callback); } @Override public CloneRules setFields(java.lang.String fields) { return (CloneRules) super.setFields(fields); } @Override public CloneRules setKey(java.lang.String key) { return (CloneRules) super.setKey(key); } @Override public CloneRules setOauthToken(java.lang.String oauthToken) { return (CloneRules) super.setOauthToken(oauthToken); } @Override public CloneRules setPrettyPrint(java.lang.Boolean prettyPrint) { return (CloneRules) super.setPrettyPrint(prettyPrint); } @Override public CloneRules setQuotaUser(java.lang.String quotaUser) { return (CloneRules) super.setQuotaUser(quotaUser); } @Override public CloneRules setUploadType(java.lang.String uploadType) { return (CloneRules) super.setUploadType(uploadType); } @Override public CloneRules setUploadProtocol(java.lang.String uploadProtocol) { return (CloneRules) super.setUploadProtocol(uploadProtocol); } @Override public CloneRules setUserIp(java.lang.String userIp) { return (CloneRules) super.setUserIp(userIp); } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public CloneRules setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } this.firewallPolicy = firewallPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public CloneRules setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** The firewall policy from which to copy rules. */ @com.google.api.client.util.Key private java.lang.String sourceFirewallPolicy; /** The firewall policy from which to copy rules. */ public java.lang.String getSourceFirewallPolicy() { return sourceFirewallPolicy; } /** The firewall policy from which to copy rules. */ public CloneRules setSourceFirewallPolicy(java.lang.String sourceFirewallPolicy) { this.sourceFirewallPolicy = sourceFirewallPolicy; return this; } @Override public CloneRules set(String parameterName, Object value) { return (CloneRules) super.set(parameterName, value); } } /** * Deletes the specified policy. * * Create a request for the method "firewallPolicies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param firewallPolicy Name of the firewall policy to delete. * @return the request */ public Delete delete(java.lang.String firewallPolicy) throws java.io.IOException { Delete result = new Delete(firewallPolicy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/{firewallPolicy}"; private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("(firewallPolicies/)?[0-9]{0,20}"); /** * Deletes the specified policy. * * Create a request for the method "firewallPolicies.delete". * * This request holds the parameters needed by the the compute 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 firewallPolicy Name of the firewall policy to delete. * @since 1.13 */ protected Delete(java.lang.String firewallPolicy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Name of the firewall policy to delete. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to delete. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to delete. */ public Delete setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } this.firewallPolicy = firewallPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified firewall policy. * * Create a request for the method "firewallPolicies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param firewallPolicy Name of the firewall policy to get. * @return the request */ public Get get(java.lang.String firewallPolicy) throws java.io.IOException { Get result = new Get(firewallPolicy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/{firewallPolicy}"; private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("(firewallPolicies/)?[0-9]{0,20}"); /** * Returns the specified firewall policy. * * Create a request for the method "firewallPolicies.get". * * This request holds the parameters needed by the the compute 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 firewallPolicy Name of the firewall policy to get. * @since 1.13 */ protected Get(java.lang.String firewallPolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FirewallPolicy.class); this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Name of the firewall policy to get. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to get. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to get. */ public Get setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } this.firewallPolicy = firewallPolicy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets an association with the specified name. * * Create a request for the method "firewallPolicies.getAssociation". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetAssociation#execute()} method to invoke the remote operation. * * @param firewallPolicy Name of the firewall policy to which the queried rule belongs. * @return the request */ public GetAssociation getAssociation(java.lang.String firewallPolicy) throws java.io.IOException { GetAssociation result = new GetAssociation(firewallPolicy); initialize(result); return result; } public class GetAssociation extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/{firewallPolicy}/getAssociation"; private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("(firewallPolicies/)?[0-9]{0,20}"); /** * Gets an association with the specified name. * * Create a request for the method "firewallPolicies.getAssociation". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetAssociation#execute()} method to invoke the remote operation. *

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

* * @param firewallPolicy Name of the firewall policy to which the queried rule belongs. * @since 1.13 */ protected GetAssociation(java.lang.String firewallPolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FirewallPolicyAssociation.class); this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } } @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 GetAssociation set$Xgafv(java.lang.String $Xgafv) { return (GetAssociation) super.set$Xgafv($Xgafv); } @Override public GetAssociation setAccessToken(java.lang.String accessToken) { return (GetAssociation) super.setAccessToken(accessToken); } @Override public GetAssociation setAlt(java.lang.String alt) { return (GetAssociation) super.setAlt(alt); } @Override public GetAssociation setCallback(java.lang.String callback) { return (GetAssociation) super.setCallback(callback); } @Override public GetAssociation setFields(java.lang.String fields) { return (GetAssociation) super.setFields(fields); } @Override public GetAssociation setKey(java.lang.String key) { return (GetAssociation) super.setKey(key); } @Override public GetAssociation setOauthToken(java.lang.String oauthToken) { return (GetAssociation) super.setOauthToken(oauthToken); } @Override public GetAssociation setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetAssociation) super.setPrettyPrint(prettyPrint); } @Override public GetAssociation setQuotaUser(java.lang.String quotaUser) { return (GetAssociation) super.setQuotaUser(quotaUser); } @Override public GetAssociation setUploadType(java.lang.String uploadType) { return (GetAssociation) super.setUploadType(uploadType); } @Override public GetAssociation setUploadProtocol(java.lang.String uploadProtocol) { return (GetAssociation) super.setUploadProtocol(uploadProtocol); } @Override public GetAssociation setUserIp(java.lang.String userIp) { return (GetAssociation) super.setUserIp(userIp); } /** Name of the firewall policy to which the queried rule belongs. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to which the queried rule belongs. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to which the queried rule belongs. */ public GetAssociation setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } this.firewallPolicy = firewallPolicy; return this; } /** The name of the association to get from the firewall policy. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the association to get from the firewall policy. */ public java.lang.String getName() { return name; } /** The name of the association to get from the firewall policy. */ public GetAssociation setName(java.lang.String name) { this.name = name; return this; } @Override public GetAssociation set(String parameterName, Object value) { return (GetAssociation) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "firewallPolicies.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/{resource}/getIamPolicy"; private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("(firewallPolicies/)?[0-9]{0,20}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "firewallPolicies.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Gets a rule of the specified priority. * * Create a request for the method "firewallPolicies.getRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetRule#execute()} method to invoke the remote operation. * * @param firewallPolicy Name of the firewall policy to which the queried rule belongs. * @return the request */ public GetRule getRule(java.lang.String firewallPolicy) throws java.io.IOException { GetRule result = new GetRule(firewallPolicy); initialize(result); return result; } public class GetRule extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/{firewallPolicy}/getRule"; private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("(firewallPolicies/)?[0-9]{0,20}"); /** * Gets a rule of the specified priority. * * Create a request for the method "firewallPolicies.getRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetRule#execute()} method to invoke the remote operation.

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

* * @param firewallPolicy Name of the firewall policy to which the queried rule belongs. * @since 1.13 */ protected GetRule(java.lang.String firewallPolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FirewallPolicyRule.class); this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } } @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 GetRule set$Xgafv(java.lang.String $Xgafv) { return (GetRule) super.set$Xgafv($Xgafv); } @Override public GetRule setAccessToken(java.lang.String accessToken) { return (GetRule) super.setAccessToken(accessToken); } @Override public GetRule setAlt(java.lang.String alt) { return (GetRule) super.setAlt(alt); } @Override public GetRule setCallback(java.lang.String callback) { return (GetRule) super.setCallback(callback); } @Override public GetRule setFields(java.lang.String fields) { return (GetRule) super.setFields(fields); } @Override public GetRule setKey(java.lang.String key) { return (GetRule) super.setKey(key); } @Override public GetRule setOauthToken(java.lang.String oauthToken) { return (GetRule) super.setOauthToken(oauthToken); } @Override public GetRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetRule) super.setPrettyPrint(prettyPrint); } @Override public GetRule setQuotaUser(java.lang.String quotaUser) { return (GetRule) super.setQuotaUser(quotaUser); } @Override public GetRule setUploadType(java.lang.String uploadType) { return (GetRule) super.setUploadType(uploadType); } @Override public GetRule setUploadProtocol(java.lang.String uploadProtocol) { return (GetRule) super.setUploadProtocol(uploadProtocol); } @Override public GetRule setUserIp(java.lang.String userIp) { return (GetRule) super.setUserIp(userIp); } /** Name of the firewall policy to which the queried rule belongs. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to which the queried rule belongs. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to which the queried rule belongs. */ public GetRule setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } this.firewallPolicy = firewallPolicy; return this; } /** The priority of the rule to get from the firewall policy. */ @com.google.api.client.util.Key private java.lang.Integer priority; /** The priority of the rule to get from the firewall policy. */ public java.lang.Integer getPriority() { return priority; } /** The priority of the rule to get from the firewall policy. */ public GetRule setPriority(java.lang.Integer priority) { this.priority = priority; return this; } @Override public GetRule set(String parameterName, Object value) { return (GetRule) super.set(parameterName, value); } } /** * Creates a new policy in the specified project using the data included in the request. * * Create a request for the method "firewallPolicies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param content the {@link com.google.api.services.compute.model.FirewallPolicy} * @return the request */ public Insert insert(com.google.api.services.compute.model.FirewallPolicy content) throws java.io.IOException { Insert result = new Insert(content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies"; /** * Creates a new policy in the specified project using the data included in the request. * * Create a request for the method "firewallPolicies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param content the {@link com.google.api.services.compute.model.FirewallPolicy} * @since 1.13 */ protected Insert(com.google.api.services.compute.model.FirewallPolicy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** * Parent ID for this request. The ID can be either be "folders/[FOLDER_ID]" if the parent is * a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization. */ @com.google.api.client.util.Key private java.lang.String parentId; /** Parent ID for this request. The ID can be either be "folders/[FOLDER_ID]" if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization. */ public java.lang.String getParentId() { return parentId; } /** * Parent ID for this request. The ID can be either be "folders/[FOLDER_ID]" if the parent is * a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization. */ public Insert setParentId(java.lang.String parentId) { this.parentId = parentId; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists all the policies that have been configured for the specified folder or organization. * * Create a request for the method "firewallPolicies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @return the request */ public List list() throws java.io.IOException { List result = new List(); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies"; /** * Lists all the policies that have been configured for the specified folder or organization. * * Create a request for the method "firewallPolicies.list". * * This request holds the parameters needed by the the compute 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.

* * @since 1.13 */ protected List() { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FirewallPolicyList.class); } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Parent ID for this request. The ID can be either be "folders/[FOLDER_ID]" if the parent is * a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization. */ @com.google.api.client.util.Key private java.lang.String parentId; /** Parent ID for this request. The ID can be either be "folders/[FOLDER_ID]" if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization. */ public java.lang.String getParentId() { return parentId; } /** * Parent ID for this request. The ID can be either be "folders/[FOLDER_ID]" if the parent is * a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization. */ public List setParentId(java.lang.String parentId) { this.parentId = parentId; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Lists associations of a specified target, i.e., organization or folder. * * Create a request for the method "firewallPolicies.listAssociations". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListAssociations#execute()} method to invoke the remote operation. * * @return the request */ public ListAssociations listAssociations() throws java.io.IOException { ListAssociations result = new ListAssociations(); initialize(result); return result; } public class ListAssociations extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/listAssociations"; /** * Lists associations of a specified target, i.e., organization or folder. * * Create a request for the method "firewallPolicies.listAssociations". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListAssociations#execute()} method to invoke the remote operation. *

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

* * @since 1.13 */ protected ListAssociations() { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FirewallPoliciesListAssociationsResponse.class); } @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 ListAssociations set$Xgafv(java.lang.String $Xgafv) { return (ListAssociations) super.set$Xgafv($Xgafv); } @Override public ListAssociations setAccessToken(java.lang.String accessToken) { return (ListAssociations) super.setAccessToken(accessToken); } @Override public ListAssociations setAlt(java.lang.String alt) { return (ListAssociations) super.setAlt(alt); } @Override public ListAssociations setCallback(java.lang.String callback) { return (ListAssociations) super.setCallback(callback); } @Override public ListAssociations setFields(java.lang.String fields) { return (ListAssociations) super.setFields(fields); } @Override public ListAssociations setKey(java.lang.String key) { return (ListAssociations) super.setKey(key); } @Override public ListAssociations setOauthToken(java.lang.String oauthToken) { return (ListAssociations) super.setOauthToken(oauthToken); } @Override public ListAssociations setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListAssociations) super.setPrettyPrint(prettyPrint); } @Override public ListAssociations setQuotaUser(java.lang.String quotaUser) { return (ListAssociations) super.setQuotaUser(quotaUser); } @Override public ListAssociations setUploadType(java.lang.String uploadType) { return (ListAssociations) super.setUploadType(uploadType); } @Override public ListAssociations setUploadProtocol(java.lang.String uploadProtocol) { return (ListAssociations) super.setUploadProtocol(uploadProtocol); } @Override public ListAssociations setUserIp(java.lang.String userIp) { return (ListAssociations) super.setUserIp(userIp); } /** The target resource to list associations. It is an organization, or a folder. */ @com.google.api.client.util.Key private java.lang.String targetResource; /** The target resource to list associations. It is an organization, or a folder. */ public java.lang.String getTargetResource() { return targetResource; } /** The target resource to list associations. It is an organization, or a folder. */ public ListAssociations setTargetResource(java.lang.String targetResource) { this.targetResource = targetResource; return this; } @Override public ListAssociations set(String parameterName, Object value) { return (ListAssociations) super.set(parameterName, value); } } /** * Moves the specified firewall policy. * * Create a request for the method "firewallPolicies.move". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Move#execute()} method to invoke the remote operation. * * @param firewallPolicy Name of the firewall policy to update. * @return the request */ public Move move(java.lang.String firewallPolicy) throws java.io.IOException { Move result = new Move(firewallPolicy); initialize(result); return result; } public class Move extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/{firewallPolicy}/move"; private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("(firewallPolicies/)?[0-9]{0,20}"); /** * Moves the specified firewall policy. * * Create a request for the method "firewallPolicies.move". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Move#execute()} method to invoke the remote operation.

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

* * @param firewallPolicy Name of the firewall policy to update. * @since 1.13 */ protected Move(java.lang.String firewallPolicy) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } } @Override public Move set$Xgafv(java.lang.String $Xgafv) { return (Move) super.set$Xgafv($Xgafv); } @Override public Move setAccessToken(java.lang.String accessToken) { return (Move) super.setAccessToken(accessToken); } @Override public Move setAlt(java.lang.String alt) { return (Move) super.setAlt(alt); } @Override public Move setCallback(java.lang.String callback) { return (Move) super.setCallback(callback); } @Override public Move setFields(java.lang.String fields) { return (Move) super.setFields(fields); } @Override public Move setKey(java.lang.String key) { return (Move) super.setKey(key); } @Override public Move setOauthToken(java.lang.String oauthToken) { return (Move) super.setOauthToken(oauthToken); } @Override public Move setPrettyPrint(java.lang.Boolean prettyPrint) { return (Move) super.setPrettyPrint(prettyPrint); } @Override public Move setQuotaUser(java.lang.String quotaUser) { return (Move) super.setQuotaUser(quotaUser); } @Override public Move setUploadType(java.lang.String uploadType) { return (Move) super.setUploadType(uploadType); } @Override public Move setUploadProtocol(java.lang.String uploadProtocol) { return (Move) super.setUploadProtocol(uploadProtocol); } @Override public Move setUserIp(java.lang.String userIp) { return (Move) super.setUserIp(userIp); } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public Move setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } this.firewallPolicy = firewallPolicy; return this; } /** * The new parent of the firewall policy. The ID can be either be "folders/[FOLDER_ID]" if the * parent is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization. */ @com.google.api.client.util.Key private java.lang.String parentId; /** The new parent of the firewall policy. The ID can be either be "folders/[FOLDER_ID]" if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization. */ public java.lang.String getParentId() { return parentId; } /** * The new parent of the firewall policy. The ID can be either be "folders/[FOLDER_ID]" if the * parent is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization. */ public Move setParentId(java.lang.String parentId) { this.parentId = parentId; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Move setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Move set(String parameterName, Object value) { return (Move) super.set(parameterName, value); } } /** * Patches the specified policy with the data included in the request. * * Create a request for the method "firewallPolicies.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicy} * @return the request */ public Patch patch(java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicy content) throws java.io.IOException { Patch result = new Patch(firewallPolicy, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/{firewallPolicy}"; private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("(firewallPolicies/)?[0-9]{0,20}"); /** * Patches the specified policy with the data included in the request. * * Create a request for the method "firewallPolicies.patch". * * This request holds the parameters needed by the the compute 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 firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicy} * @since 1.13 */ protected Patch(java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicy content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public Patch setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } this.firewallPolicy = firewallPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Patches a rule of the specified priority. * * Create a request for the method "firewallPolicies.patchRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link PatchRule#execute()} method to invoke the remote operation. * * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyRule} * @return the request */ public PatchRule patchRule(java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyRule content) throws java.io.IOException { PatchRule result = new PatchRule(firewallPolicy, content); initialize(result); return result; } public class PatchRule extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/{firewallPolicy}/patchRule"; private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("(firewallPolicies/)?[0-9]{0,20}"); /** * Patches a rule of the specified priority. * * Create a request for the method "firewallPolicies.patchRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link PatchRule#execute()} method to invoke the remote operation.

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

* * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyRule} * @since 1.13 */ protected PatchRule(java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyRule content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } } @Override public PatchRule set$Xgafv(java.lang.String $Xgafv) { return (PatchRule) super.set$Xgafv($Xgafv); } @Override public PatchRule setAccessToken(java.lang.String accessToken) { return (PatchRule) super.setAccessToken(accessToken); } @Override public PatchRule setAlt(java.lang.String alt) { return (PatchRule) super.setAlt(alt); } @Override public PatchRule setCallback(java.lang.String callback) { return (PatchRule) super.setCallback(callback); } @Override public PatchRule setFields(java.lang.String fields) { return (PatchRule) super.setFields(fields); } @Override public PatchRule setKey(java.lang.String key) { return (PatchRule) super.setKey(key); } @Override public PatchRule setOauthToken(java.lang.String oauthToken) { return (PatchRule) super.setOauthToken(oauthToken); } @Override public PatchRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (PatchRule) super.setPrettyPrint(prettyPrint); } @Override public PatchRule setQuotaUser(java.lang.String quotaUser) { return (PatchRule) super.setQuotaUser(quotaUser); } @Override public PatchRule setUploadType(java.lang.String uploadType) { return (PatchRule) super.setUploadType(uploadType); } @Override public PatchRule setUploadProtocol(java.lang.String uploadProtocol) { return (PatchRule) super.setUploadProtocol(uploadProtocol); } @Override public PatchRule setUserIp(java.lang.String userIp) { return (PatchRule) super.setUserIp(userIp); } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public PatchRule setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } this.firewallPolicy = firewallPolicy; return this; } /** The priority of the rule to patch. */ @com.google.api.client.util.Key private java.lang.Integer priority; /** The priority of the rule to patch. */ public java.lang.Integer getPriority() { return priority; } /** The priority of the rule to patch. */ public PatchRule setPriority(java.lang.Integer priority) { this.priority = priority; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public PatchRule setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public PatchRule set(String parameterName, Object value) { return (PatchRule) super.set(parameterName, value); } } /** * Removes an association for the specified firewall policy. * * Create a request for the method "firewallPolicies.removeAssociation". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RemoveAssociation#execute()} method to invoke the remote operation. * * @param firewallPolicy Name of the firewall policy to update. * @return the request */ public RemoveAssociation removeAssociation(java.lang.String firewallPolicy) throws java.io.IOException { RemoveAssociation result = new RemoveAssociation(firewallPolicy); initialize(result); return result; } public class RemoveAssociation extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation"; private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("(firewallPolicies/)?[0-9]{0,20}"); /** * Removes an association for the specified firewall policy. * * Create a request for the method "firewallPolicies.removeAssociation". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RemoveAssociation#execute()} method to invoke the remote operation. *

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

* * @param firewallPolicy Name of the firewall policy to update. * @since 1.13 */ protected RemoveAssociation(java.lang.String firewallPolicy) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } } @Override public RemoveAssociation set$Xgafv(java.lang.String $Xgafv) { return (RemoveAssociation) super.set$Xgafv($Xgafv); } @Override public RemoveAssociation setAccessToken(java.lang.String accessToken) { return (RemoveAssociation) super.setAccessToken(accessToken); } @Override public RemoveAssociation setAlt(java.lang.String alt) { return (RemoveAssociation) super.setAlt(alt); } @Override public RemoveAssociation setCallback(java.lang.String callback) { return (RemoveAssociation) super.setCallback(callback); } @Override public RemoveAssociation setFields(java.lang.String fields) { return (RemoveAssociation) super.setFields(fields); } @Override public RemoveAssociation setKey(java.lang.String key) { return (RemoveAssociation) super.setKey(key); } @Override public RemoveAssociation setOauthToken(java.lang.String oauthToken) { return (RemoveAssociation) super.setOauthToken(oauthToken); } @Override public RemoveAssociation setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveAssociation) super.setPrettyPrint(prettyPrint); } @Override public RemoveAssociation setQuotaUser(java.lang.String quotaUser) { return (RemoveAssociation) super.setQuotaUser(quotaUser); } @Override public RemoveAssociation setUploadType(java.lang.String uploadType) { return (RemoveAssociation) super.setUploadType(uploadType); } @Override public RemoveAssociation setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveAssociation) super.setUploadProtocol(uploadProtocol); } @Override public RemoveAssociation setUserIp(java.lang.String userIp) { return (RemoveAssociation) super.setUserIp(userIp); } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public RemoveAssociation setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } this.firewallPolicy = firewallPolicy; return this; } /** Name for the attachment that will be removed. */ @com.google.api.client.util.Key private java.lang.String name; /** Name for the attachment that will be removed. */ public java.lang.String getName() { return name; } /** Name for the attachment that will be removed. */ public RemoveAssociation setName(java.lang.String name) { this.name = name; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public RemoveAssociation setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public RemoveAssociation set(String parameterName, Object value) { return (RemoveAssociation) super.set(parameterName, value); } } /** * Deletes a rule of the specified priority. * * Create a request for the method "firewallPolicies.removeRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RemoveRule#execute()} method to invoke the remote operation. * * @param firewallPolicy Name of the firewall policy to update. * @return the request */ public RemoveRule removeRule(java.lang.String firewallPolicy) throws java.io.IOException { RemoveRule result = new RemoveRule(firewallPolicy); initialize(result); return result; } public class RemoveRule extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/{firewallPolicy}/removeRule"; private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("(firewallPolicies/)?[0-9]{0,20}"); /** * Deletes a rule of the specified priority. * * Create a request for the method "firewallPolicies.removeRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RemoveRule#execute()} method to invoke the remote operation.

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

* * @param firewallPolicy Name of the firewall policy to update. * @since 1.13 */ protected RemoveRule(java.lang.String firewallPolicy) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } } @Override public RemoveRule set$Xgafv(java.lang.String $Xgafv) { return (RemoveRule) super.set$Xgafv($Xgafv); } @Override public RemoveRule setAccessToken(java.lang.String accessToken) { return (RemoveRule) super.setAccessToken(accessToken); } @Override public RemoveRule setAlt(java.lang.String alt) { return (RemoveRule) super.setAlt(alt); } @Override public RemoveRule setCallback(java.lang.String callback) { return (RemoveRule) super.setCallback(callback); } @Override public RemoveRule setFields(java.lang.String fields) { return (RemoveRule) super.setFields(fields); } @Override public RemoveRule setKey(java.lang.String key) { return (RemoveRule) super.setKey(key); } @Override public RemoveRule setOauthToken(java.lang.String oauthToken) { return (RemoveRule) super.setOauthToken(oauthToken); } @Override public RemoveRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveRule) super.setPrettyPrint(prettyPrint); } @Override public RemoveRule setQuotaUser(java.lang.String quotaUser) { return (RemoveRule) super.setQuotaUser(quotaUser); } @Override public RemoveRule setUploadType(java.lang.String uploadType) { return (RemoveRule) super.setUploadType(uploadType); } @Override public RemoveRule setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveRule) super.setUploadProtocol(uploadProtocol); } @Override public RemoveRule setUserIp(java.lang.String userIp) { return (RemoveRule) super.setUserIp(userIp); } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public RemoveRule setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } this.firewallPolicy = firewallPolicy; return this; } /** The priority of the rule to remove from the firewall policy. */ @com.google.api.client.util.Key private java.lang.Integer priority; /** The priority of the rule to remove from the firewall policy. */ public java.lang.Integer getPriority() { return priority; } /** The priority of the rule to remove from the firewall policy. */ public RemoveRule setPriority(java.lang.Integer priority) { this.priority = priority; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public RemoveRule setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public RemoveRule set(String parameterName, Object value) { return (RemoveRule) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "firewallPolicies.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalOrganizationSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String resource, com.google.api.services.compute.model.GlobalOrganizationSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/{resource}/setIamPolicy"; private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("(firewallPolicies/)?[0-9]{0,20}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "firewallPolicies.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalOrganizationSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String resource, com.google.api.services.compute.model.GlobalOrganizationSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "firewallPolicies.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "locations/global/firewallPolicies/{resource}/testIamPermissions"; private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("(firewallPolicies/)?[0-9]{0,20}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "firewallPolicies.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "(firewallPolicies/)?[0-9]{0,20}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Firewalls collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Firewalls.List request = compute.firewalls().list(parameters ...)}
   * 
* * @return the resource collection */ public Firewalls firewalls() { return new Firewalls(); } /** * The "firewalls" collection of methods. */ public class Firewalls { /** * Deletes the specified firewall. * * Create a request for the method "firewalls.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param firewall Name of the firewall rule to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String firewall) throws java.io.IOException { Delete result = new Delete(project, firewall); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewalls/{firewall}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FIREWALL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified firewall. * * Create a request for the method "firewalls.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param firewall Name of the firewall rule to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String firewall) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.firewall = com.google.api.client.util.Preconditions.checkNotNull(firewall, "Required parameter firewall must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_PATTERN.matcher(firewall).matches(), "Parameter firewall must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the firewall rule to delete. */ @com.google.api.client.util.Key private java.lang.String firewall; /** Name of the firewall rule to delete. */ public java.lang.String getFirewall() { return firewall; } /** Name of the firewall rule to delete. */ public Delete setFirewall(java.lang.String firewall) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_PATTERN.matcher(firewall).matches(), "Parameter firewall must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewall = firewall; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified firewall. * * Create a request for the method "firewalls.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param firewall Name of the firewall rule to return. * @return the request */ public Get get(java.lang.String project, java.lang.String firewall) throws java.io.IOException { Get result = new Get(project, firewall); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewalls/{firewall}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FIREWALL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified firewall. * * Create a request for the method "firewalls.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param firewall Name of the firewall rule to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String firewall) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Firewall.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.firewall = com.google.api.client.util.Preconditions.checkNotNull(firewall, "Required parameter firewall must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_PATTERN.matcher(firewall).matches(), "Parameter firewall must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the firewall rule to return. */ @com.google.api.client.util.Key private java.lang.String firewall; /** Name of the firewall rule to return. */ public java.lang.String getFirewall() { return firewall; } /** Name of the firewall rule to return. */ public Get setFirewall(java.lang.String firewall) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_PATTERN.matcher(firewall).matches(), "Parameter firewall must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewall = firewall; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a firewall rule in the specified project using the data included in the request. * * Create a request for the method "firewalls.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Firewall} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.Firewall content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewalls"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a firewall rule in the specified project using the data included in the request. * * Create a request for the method "firewalls.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Firewall} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.Firewall content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of firewall rules available to the specified project. * * Create a request for the method "firewalls.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewalls"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of firewall rules available to the specified project. * * Create a request for the method "firewalls.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FirewallList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the specified firewall rule with the data included in the request. This method supports * PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "firewalls.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param firewall Name of the firewall rule to patch. * @param content the {@link com.google.api.services.compute.model.Firewall} * @return the request */ public Patch patch(java.lang.String project, java.lang.String firewall, com.google.api.services.compute.model.Firewall content) throws java.io.IOException { Patch result = new Patch(project, firewall, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewalls/{firewall}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FIREWALL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified firewall rule with the data included in the request. This method supports * PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "firewalls.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param firewall Name of the firewall rule to patch. * @param content the {@link com.google.api.services.compute.model.Firewall} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String firewall, com.google.api.services.compute.model.Firewall content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.firewall = com.google.api.client.util.Preconditions.checkNotNull(firewall, "Required parameter firewall must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_PATTERN.matcher(firewall).matches(), "Parameter firewall must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the firewall rule to patch. */ @com.google.api.client.util.Key private java.lang.String firewall; /** Name of the firewall rule to patch. */ public java.lang.String getFirewall() { return firewall; } /** Name of the firewall rule to patch. */ public Patch setFirewall(java.lang.String firewall) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_PATTERN.matcher(firewall).matches(), "Parameter firewall must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewall = firewall; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates the specified firewall rule with the data included in the request. Note that all fields * will be updated if using PUT, even fields that are not specified. To update individual fields, * please use PATCH instead. * * Create a request for the method "firewalls.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param firewall Name of the firewall rule to update. * @param content the {@link com.google.api.services.compute.model.Firewall} * @return the request */ public Update update(java.lang.String project, java.lang.String firewall, com.google.api.services.compute.model.Firewall content) throws java.io.IOException { Update result = new Update(project, firewall, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewalls/{firewall}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FIREWALL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified firewall rule with the data included in the request. Note that all fields * will be updated if using PUT, even fields that are not specified. To update individual fields, * please use PATCH instead. * * Create a request for the method "firewalls.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param firewall Name of the firewall rule to update. * @param content the {@link com.google.api.services.compute.model.Firewall} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String firewall, com.google.api.services.compute.model.Firewall content) { super(Compute.this, "PUT", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.firewall = com.google.api.client.util.Preconditions.checkNotNull(firewall, "Required parameter firewall must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_PATTERN.matcher(firewall).matches(), "Parameter firewall must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the firewall rule to update. */ @com.google.api.client.util.Key private java.lang.String firewall; /** Name of the firewall rule to update. */ public java.lang.String getFirewall() { return firewall; } /** Name of the firewall rule to update. */ public Update setFirewall(java.lang.String firewall) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_PATTERN.matcher(firewall).matches(), "Parameter firewall must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewall = firewall; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the ForwardingRules collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.ForwardingRules.List request = compute.forwardingRules().list(parameters ...)}
   * 
* * @return the resource collection */ public ForwardingRules forwardingRules() { return new ForwardingRules(); } /** * The "forwardingRules" collection of methods. */ public class ForwardingRules { /** * Retrieves an aggregated list of forwarding rules. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "forwardingRules.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/forwardingRules"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of forwarding rules. To prevent failure, Google recommends that * you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "forwardingRules.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ForwardingRuleAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified ForwardingRule resource. * * Create a request for the method "forwardingRules.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param forwardingRule Name of the ForwardingRule resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String forwardingRule) throws java.io.IOException { Delete result = new Delete(project, region, forwardingRule); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FORWARDING_RULE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified ForwardingRule resource. * * Create a request for the method "forwardingRules.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param forwardingRule Name of the ForwardingRule resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String forwardingRule) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.forwardingRule = com.google.api.client.util.Preconditions.checkNotNull(forwardingRule, "Required parameter forwardingRule must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the ForwardingRule resource to delete. */ @com.google.api.client.util.Key private java.lang.String forwardingRule; /** Name of the ForwardingRule resource to delete. */ public java.lang.String getForwardingRule() { return forwardingRule; } /** Name of the ForwardingRule resource to delete. */ public Delete setForwardingRule(java.lang.String forwardingRule) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.forwardingRule = forwardingRule; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified ForwardingRule resource. * * Create a request for the method "forwardingRules.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param forwardingRule Name of the ForwardingRule resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String forwardingRule) throws java.io.IOException { Get result = new Get(project, region, forwardingRule); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FORWARDING_RULE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified ForwardingRule resource. * * Create a request for the method "forwardingRules.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param forwardingRule Name of the ForwardingRule resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String forwardingRule) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ForwardingRule.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.forwardingRule = com.google.api.client.util.Preconditions.checkNotNull(forwardingRule, "Required parameter forwardingRule must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the ForwardingRule resource to return. */ @com.google.api.client.util.Key private java.lang.String forwardingRule; /** Name of the ForwardingRule resource to return. */ public java.lang.String getForwardingRule() { return forwardingRule; } /** Name of the ForwardingRule resource to return. */ public Get setForwardingRule(java.lang.String forwardingRule) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.forwardingRule = forwardingRule; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a ForwardingRule resource in the specified project and region using the data included in * the request. * * Create a request for the method "forwardingRules.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.ForwardingRule} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.ForwardingRule content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/forwardingRules"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a ForwardingRule resource in the specified project and region using the data included * in the request. * * Create a request for the method "forwardingRules.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.ForwardingRule} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.ForwardingRule content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of ForwardingRule resources available to the specified project and region. * * Create a request for the method "forwardingRules.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/forwardingRules"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of ForwardingRule resources available to the specified project and region. * * Create a request for the method "forwardingRules.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ForwardingRuleList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the specified forwarding rule with the data included in the request. This method supports * PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can * only patch the network_tier field. * * Create a request for the method "forwardingRules.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param forwardingRule Name of the ForwardingRule resource to patch. * @param content the {@link com.google.api.services.compute.model.ForwardingRule} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String forwardingRule, com.google.api.services.compute.model.ForwardingRule content) throws java.io.IOException { Patch result = new Patch(project, region, forwardingRule, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FORWARDING_RULE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified forwarding rule with the data included in the request. This method * supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, * you can only patch the network_tier field. * * Create a request for the method "forwardingRules.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param forwardingRule Name of the ForwardingRule resource to patch. * @param content the {@link com.google.api.services.compute.model.ForwardingRule} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String forwardingRule, com.google.api.services.compute.model.ForwardingRule content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.forwardingRule = com.google.api.client.util.Preconditions.checkNotNull(forwardingRule, "Required parameter forwardingRule must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the ForwardingRule resource to patch. */ @com.google.api.client.util.Key private java.lang.String forwardingRule; /** Name of the ForwardingRule resource to patch. */ public java.lang.String getForwardingRule() { return forwardingRule; } /** Name of the ForwardingRule resource to patch. */ public Patch setForwardingRule(java.lang.String forwardingRule) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.forwardingRule = forwardingRule; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Sets the labels on the specified resource. To learn more about labels, read the Labeling * Resources documentation. * * Create a request for the method "forwardingRules.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, region, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on the specified resource. To learn more about labels, read the Labeling * Resources documentation. * * Create a request for the method "forwardingRules.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The region for this request. */ public java.lang.String getRegion() { return region; } /** The region for this request. */ public SetLabels setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetLabels setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } /** * Changes target URL for forwarding rule. The new target should be of the same type as the old * target. * * Create a request for the method "forwardingRules.setTarget". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetTarget#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param forwardingRule Name of the ForwardingRule resource in which target is to be set. * @param content the {@link com.google.api.services.compute.model.TargetReference} * @return the request */ public SetTarget setTarget(java.lang.String project, java.lang.String region, java.lang.String forwardingRule, com.google.api.services.compute.model.TargetReference content) throws java.io.IOException { SetTarget result = new SetTarget(project, region, forwardingRule, content); initialize(result); return result; } public class SetTarget extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FORWARDING_RULE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Changes target URL for forwarding rule. The new target should be of the same type as the old * target. * * Create a request for the method "forwardingRules.setTarget". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetTarget#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param forwardingRule Name of the ForwardingRule resource in which target is to be set. * @param content the {@link com.google.api.services.compute.model.TargetReference} * @since 1.13 */ protected SetTarget(java.lang.String project, java.lang.String region, java.lang.String forwardingRule, com.google.api.services.compute.model.TargetReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.forwardingRule = com.google.api.client.util.Preconditions.checkNotNull(forwardingRule, "Required parameter forwardingRule must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetTarget set$Xgafv(java.lang.String $Xgafv) { return (SetTarget) super.set$Xgafv($Xgafv); } @Override public SetTarget setAccessToken(java.lang.String accessToken) { return (SetTarget) super.setAccessToken(accessToken); } @Override public SetTarget setAlt(java.lang.String alt) { return (SetTarget) super.setAlt(alt); } @Override public SetTarget setCallback(java.lang.String callback) { return (SetTarget) super.setCallback(callback); } @Override public SetTarget setFields(java.lang.String fields) { return (SetTarget) super.setFields(fields); } @Override public SetTarget setKey(java.lang.String key) { return (SetTarget) super.setKey(key); } @Override public SetTarget setOauthToken(java.lang.String oauthToken) { return (SetTarget) super.setOauthToken(oauthToken); } @Override public SetTarget setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetTarget) super.setPrettyPrint(prettyPrint); } @Override public SetTarget setQuotaUser(java.lang.String quotaUser) { return (SetTarget) super.setQuotaUser(quotaUser); } @Override public SetTarget setUploadType(java.lang.String uploadType) { return (SetTarget) super.setUploadType(uploadType); } @Override public SetTarget setUploadProtocol(java.lang.String uploadProtocol) { return (SetTarget) super.setUploadProtocol(uploadProtocol); } @Override public SetTarget setUserIp(java.lang.String userIp) { return (SetTarget) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetTarget setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public SetTarget setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the ForwardingRule resource in which target is to be set. */ @com.google.api.client.util.Key private java.lang.String forwardingRule; /** Name of the ForwardingRule resource in which target is to be set. */ public java.lang.String getForwardingRule() { return forwardingRule; } /** Name of the ForwardingRule resource in which target is to be set. */ public SetTarget setForwardingRule(java.lang.String forwardingRule) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.forwardingRule = forwardingRule; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetTarget setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetTarget set(String parameterName, Object value) { return (SetTarget) super.set(parameterName, value); } } } /** * An accessor for creating requests from the FutureReservations collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.FutureReservations.List request = compute.futureReservations().list(parameters ...)}
   * 
* * @return the resource collection */ public FutureReservations futureReservations() { return new FutureReservations(); } /** * The "futureReservations" collection of methods. */ public class FutureReservations { /** * Retrieves an aggregated list of future reservations. To prevent failure, Google recommends that * you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "futureReservations.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/futureReservations"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of future reservations. To prevent failure, Google recommends that * you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "futureReservations.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FutureReservationsAggregatedListResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Cancel the specified future reservation. * * Create a request for the method "futureReservations.cancel". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Cancel#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. Name should conform to RFC1035. * @param futureReservation Name of the future reservation to retrieve. Name should conform to RFC1035. * @return the request */ public Cancel cancel(java.lang.String project, java.lang.String zone, java.lang.String futureReservation) throws java.io.IOException { Cancel result = new Cancel(project, zone, futureReservation); initialize(result); return result; } public class Cancel extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/futureReservations/{futureReservation}/cancel"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Cancel the specified future reservation. * * Create a request for the method "futureReservations.cancel". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone for this request. Name should conform to RFC1035. * @param futureReservation Name of the future reservation to retrieve. Name should conform to RFC1035. * @since 1.13 */ protected Cancel(java.lang.String project, java.lang.String zone, java.lang.String futureReservation) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.futureReservation = com.google.api.client.util.Preconditions.checkNotNull(futureReservation, "Required parameter futureReservation must be specified."); } @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); } @Override public Cancel setUserIp(java.lang.String userIp) { return (Cancel) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Cancel setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. Name should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. Name should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. Name should conform to RFC1035. */ public Cancel setZone(java.lang.String zone) { this.zone = zone; return this; } /** Name of the future reservation to retrieve. Name should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String futureReservation; /** Name of the future reservation to retrieve. Name should conform to RFC1035. */ public java.lang.String getFutureReservation() { return futureReservation; } /** Name of the future reservation to retrieve. Name should conform to RFC1035. */ public Cancel setFutureReservation(java.lang.String futureReservation) { this.futureReservation = futureReservation; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Cancel setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Cancel set(String parameterName, Object value) { return (Cancel) super.set(parameterName, value); } } /** * Deletes the specified future reservation. * * Create a request for the method "futureReservations.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. Name should conform to RFC1035. * @param futureReservation Name of the future reservation to retrieve. Name should conform to RFC1035. * @return the request */ public Delete delete(java.lang.String project, java.lang.String zone, java.lang.String futureReservation) throws java.io.IOException { Delete result = new Delete(project, zone, futureReservation); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/futureReservations/{futureReservation}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Deletes the specified future reservation. * * Create a request for the method "futureReservations.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone for this request. Name should conform to RFC1035. * @param futureReservation Name of the future reservation to retrieve. Name should conform to RFC1035. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String zone, java.lang.String futureReservation) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.futureReservation = com.google.api.client.util.Preconditions.checkNotNull(futureReservation, "Required parameter futureReservation must be specified."); } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. Name should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. Name should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. Name should conform to RFC1035. */ public Delete setZone(java.lang.String zone) { this.zone = zone; return this; } /** Name of the future reservation to retrieve. Name should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String futureReservation; /** Name of the future reservation to retrieve. Name should conform to RFC1035. */ public java.lang.String getFutureReservation() { return futureReservation; } /** Name of the future reservation to retrieve. Name should conform to RFC1035. */ public Delete setFutureReservation(java.lang.String futureReservation) { this.futureReservation = futureReservation; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Retrieves information about the specified future reservation. * * Create a request for the method "futureReservations.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. Name should conform to RFC1035. * @param futureReservation Name of the future reservation to retrieve. Name should conform to RFC1035. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String futureReservation) throws java.io.IOException { Get result = new Get(project, zone, futureReservation); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/futureReservations/{futureReservation}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves information about the specified future reservation. * * Create a request for the method "futureReservations.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone for this request. Name should conform to RFC1035. * @param futureReservation Name of the future reservation to retrieve. Name should conform to RFC1035. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String futureReservation) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FutureReservation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.futureReservation = com.google.api.client.util.Preconditions.checkNotNull(futureReservation, "Required parameter futureReservation must be specified."); } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. Name should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. Name should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. Name should conform to RFC1035. */ public Get setZone(java.lang.String zone) { this.zone = zone; return this; } /** Name of the future reservation to retrieve. Name should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String futureReservation; /** Name of the future reservation to retrieve. Name should conform to RFC1035. */ public java.lang.String getFutureReservation() { return futureReservation; } /** Name of the future reservation to retrieve. Name should conform to RFC1035. */ public Get setFutureReservation(java.lang.String futureReservation) { this.futureReservation = futureReservation; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a new Future Reservation. * * Create a request for the method "futureReservations.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. Name should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.FutureReservation} * @return the request */ public Insert insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.FutureReservation content) throws java.io.IOException { Insert result = new Insert(project, zone, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/futureReservations"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a new Future Reservation. * * Create a request for the method "futureReservations.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone Name of the zone for this request. Name should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.FutureReservation} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.FutureReservation content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. Name should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. Name should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. Name should conform to RFC1035. */ public Insert setZone(java.lang.String zone) { this.zone = zone; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * A list of all the future reservations that have been configured for the specified project in * specified zone. * * Create a request for the method "futureReservations.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. Name should conform to RFC1035. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/futureReservations"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * A list of all the future reservations that have been configured for the specified project in * specified zone. * * Create a request for the method "futureReservations.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone for this request. Name should conform to RFC1035. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FutureReservationsListResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. Name should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. Name should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. Name should conform to RFC1035. */ public List setZone(java.lang.String zone) { this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the specified future reservation. * * Create a request for the method "futureReservations.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. Name should conform to RFC1035. * @param futureReservation Name of the reservation to update. Name should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.FutureReservation} * @return the request */ public Update update(java.lang.String project, java.lang.String zone, java.lang.String futureReservation, com.google.api.services.compute.model.FutureReservation content) throws java.io.IOException { Update result = new Update(project, zone, futureReservation, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/futureReservations/{futureReservation}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Updates the specified future reservation. * * Create a request for the method "futureReservations.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone Name of the zone for this request. Name should conform to RFC1035. * @param futureReservation Name of the reservation to update. Name should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.FutureReservation} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String zone, java.lang.String futureReservation, com.google.api.services.compute.model.FutureReservation content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.futureReservation = com.google.api.client.util.Preconditions.checkNotNull(futureReservation, "Required parameter futureReservation must be specified."); } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. Name should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. Name should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. Name should conform to RFC1035. */ public Update setZone(java.lang.String zone) { this.zone = zone; return this; } /** Name of the reservation to update. Name should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String futureReservation; /** Name of the reservation to update. Name should conform to RFC1035. */ public java.lang.String getFutureReservation() { return futureReservation; } /** Name of the reservation to update. Name should conform to RFC1035. */ public Update setFutureReservation(java.lang.String futureReservation) { this.futureReservation = futureReservation; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** update_mask indicates fields to be updated as part of this request. */ @com.google.api.client.util.Key private String updateMask; /** update_mask indicates fields to be updated as part of this request. */ public String getUpdateMask() { return updateMask; } /** update_mask indicates fields to be updated as part of this request. */ public Update setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the GlobalAddresses collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.GlobalAddresses.List request = compute.globalAddresses().list(parameters ...)}
   * 
* * @return the resource collection */ public GlobalAddresses globalAddresses() { return new GlobalAddresses(); } /** * The "globalAddresses" collection of methods. */ public class GlobalAddresses { /** * Deletes the specified address resource. * * Create a request for the method "globalAddresses.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param address Name of the address resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String address) throws java.io.IOException { Delete result = new Delete(project, address); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/addresses/{address}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ADDRESS_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified address resource. * * Create a request for the method "globalAddresses.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param address Name of the address resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String address) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.address = com.google.api.client.util.Preconditions.checkNotNull(address, "Required parameter address must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ADDRESS_PATTERN.matcher(address).matches(), "Parameter address must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the address resource to delete. */ @com.google.api.client.util.Key private java.lang.String address; /** Name of the address resource to delete. */ public java.lang.String getAddress() { return address; } /** Name of the address resource to delete. */ public Delete setAddress(java.lang.String address) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ADDRESS_PATTERN.matcher(address).matches(), "Parameter address must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.address = address; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified address resource. * * Create a request for the method "globalAddresses.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param address Name of the address resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String address) throws java.io.IOException { Get result = new Get(project, address); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/addresses/{address}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ADDRESS_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified address resource. * * Create a request for the method "globalAddresses.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param address Name of the address resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String address) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Address.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.address = com.google.api.client.util.Preconditions.checkNotNull(address, "Required parameter address must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ADDRESS_PATTERN.matcher(address).matches(), "Parameter address must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the address resource to return. */ @com.google.api.client.util.Key private java.lang.String address; /** Name of the address resource to return. */ public java.lang.String getAddress() { return address; } /** Name of the address resource to return. */ public Get setAddress(java.lang.String address) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ADDRESS_PATTERN.matcher(address).matches(), "Parameter address must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.address = address; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates an address resource in the specified project by using the data included in the request. * * Create a request for the method "globalAddresses.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Address} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.Address content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/addresses"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates an address resource in the specified project by using the data included in the request. * * Create a request for the method "globalAddresses.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Address} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.Address content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of global addresses. * * Create a request for the method "globalAddresses.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/addresses"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves a list of global addresses. * * Create a request for the method "globalAddresses.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.AddressList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Moves the specified address resource from one project to another project. * * Create a request for the method "globalAddresses.move". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Move#execute()} method to invoke the remote operation. * * @param project Source project ID which the Address is moved from. * @param address Name of the address resource to move. * @param content the {@link com.google.api.services.compute.model.GlobalAddressesMoveRequest} * @return the request */ public Move move(java.lang.String project, java.lang.String address, com.google.api.services.compute.model.GlobalAddressesMoveRequest content) throws java.io.IOException { Move result = new Move(project, address, content); initialize(result); return result; } public class Move extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/addresses/{address}/move"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ADDRESS_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Moves the specified address resource from one project to another project. * * Create a request for the method "globalAddresses.move". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Move#execute()} method to invoke the remote operation.

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

* * @param project Source project ID which the Address is moved from. * @param address Name of the address resource to move. * @param content the {@link com.google.api.services.compute.model.GlobalAddressesMoveRequest} * @since 1.13 */ protected Move(java.lang.String project, java.lang.String address, com.google.api.services.compute.model.GlobalAddressesMoveRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.address = com.google.api.client.util.Preconditions.checkNotNull(address, "Required parameter address must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ADDRESS_PATTERN.matcher(address).matches(), "Parameter address must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Move set$Xgafv(java.lang.String $Xgafv) { return (Move) super.set$Xgafv($Xgafv); } @Override public Move setAccessToken(java.lang.String accessToken) { return (Move) super.setAccessToken(accessToken); } @Override public Move setAlt(java.lang.String alt) { return (Move) super.setAlt(alt); } @Override public Move setCallback(java.lang.String callback) { return (Move) super.setCallback(callback); } @Override public Move setFields(java.lang.String fields) { return (Move) super.setFields(fields); } @Override public Move setKey(java.lang.String key) { return (Move) super.setKey(key); } @Override public Move setOauthToken(java.lang.String oauthToken) { return (Move) super.setOauthToken(oauthToken); } @Override public Move setPrettyPrint(java.lang.Boolean prettyPrint) { return (Move) super.setPrettyPrint(prettyPrint); } @Override public Move setQuotaUser(java.lang.String quotaUser) { return (Move) super.setQuotaUser(quotaUser); } @Override public Move setUploadType(java.lang.String uploadType) { return (Move) super.setUploadType(uploadType); } @Override public Move setUploadProtocol(java.lang.String uploadProtocol) { return (Move) super.setUploadProtocol(uploadProtocol); } @Override public Move setUserIp(java.lang.String userIp) { return (Move) super.setUserIp(userIp); } /** Source project ID which the Address is moved from. */ @com.google.api.client.util.Key private java.lang.String project; /** Source project ID which the Address is moved from. */ public java.lang.String getProject() { return project; } /** Source project ID which the Address is moved from. */ public Move setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the address resource to move. */ @com.google.api.client.util.Key private java.lang.String address; /** Name of the address resource to move. */ public java.lang.String getAddress() { return address; } /** Name of the address resource to move. */ public Move setAddress(java.lang.String address) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ADDRESS_PATTERN.matcher(address).matches(), "Parameter address must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.address = address; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Move setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Move set(String parameterName, Object value) { return (Move) super.set(parameterName, value); } } /** * Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "globalAddresses.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/addresses/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "globalAddresses.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } } /** * An accessor for creating requests from the GlobalForwardingRules collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.GlobalForwardingRules.List request = compute.globalForwardingRules().list(parameters ...)}
   * 
* * @return the resource collection */ public GlobalForwardingRules globalForwardingRules() { return new GlobalForwardingRules(); } /** * The "globalForwardingRules" collection of methods. */ public class GlobalForwardingRules { /** * Deletes the specified GlobalForwardingRule resource. * * Create a request for the method "globalForwardingRules.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param forwardingRule Name of the ForwardingRule resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String forwardingRule) throws java.io.IOException { Delete result = new Delete(project, forwardingRule); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/forwardingRules/{forwardingRule}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FORWARDING_RULE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified GlobalForwardingRule resource. * * Create a request for the method "globalForwardingRules.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param forwardingRule Name of the ForwardingRule resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String forwardingRule) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.forwardingRule = com.google.api.client.util.Preconditions.checkNotNull(forwardingRule, "Required parameter forwardingRule must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the ForwardingRule resource to delete. */ @com.google.api.client.util.Key private java.lang.String forwardingRule; /** Name of the ForwardingRule resource to delete. */ public java.lang.String getForwardingRule() { return forwardingRule; } /** Name of the ForwardingRule resource to delete. */ public Delete setForwardingRule(java.lang.String forwardingRule) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.forwardingRule = forwardingRule; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by * making a list() request. * * Create a request for the method "globalForwardingRules.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param forwardingRule Name of the ForwardingRule resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String forwardingRule) throws java.io.IOException { Get result = new Get(project, forwardingRule); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/forwardingRules/{forwardingRule}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FORWARDING_RULE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules * by making a list() request. * * Create a request for the method "globalForwardingRules.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param forwardingRule Name of the ForwardingRule resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String forwardingRule) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ForwardingRule.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.forwardingRule = com.google.api.client.util.Preconditions.checkNotNull(forwardingRule, "Required parameter forwardingRule must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the ForwardingRule resource to return. */ @com.google.api.client.util.Key private java.lang.String forwardingRule; /** Name of the ForwardingRule resource to return. */ public java.lang.String getForwardingRule() { return forwardingRule; } /** Name of the ForwardingRule resource to return. */ public Get setForwardingRule(java.lang.String forwardingRule) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.forwardingRule = forwardingRule; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a GlobalForwardingRule resource in the specified project using the data included in the * request. * * Create a request for the method "globalForwardingRules.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.ForwardingRule} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.ForwardingRule content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/forwardingRules"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a GlobalForwardingRule resource in the specified project using the data included in the * request. * * Create a request for the method "globalForwardingRules.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.ForwardingRule} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.ForwardingRule content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of GlobalForwardingRule resources available to the specified project. * * Create a request for the method "globalForwardingRules.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/forwardingRules"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves a list of GlobalForwardingRule resources available to the specified project. * * Create a request for the method "globalForwardingRules.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ForwardingRuleList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the specified forwarding rule with the data included in the request. This method supports * PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can * only patch the network_tier field. * * Create a request for the method "globalForwardingRules.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param forwardingRule Name of the ForwardingRule resource to patch. * @param content the {@link com.google.api.services.compute.model.ForwardingRule} * @return the request */ public Patch patch(java.lang.String project, java.lang.String forwardingRule, com.google.api.services.compute.model.ForwardingRule content) throws java.io.IOException { Patch result = new Patch(project, forwardingRule, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/forwardingRules/{forwardingRule}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FORWARDING_RULE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified forwarding rule with the data included in the request. This method * supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, * you can only patch the network_tier field. * * Create a request for the method "globalForwardingRules.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param forwardingRule Name of the ForwardingRule resource to patch. * @param content the {@link com.google.api.services.compute.model.ForwardingRule} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String forwardingRule, com.google.api.services.compute.model.ForwardingRule content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.forwardingRule = com.google.api.client.util.Preconditions.checkNotNull(forwardingRule, "Required parameter forwardingRule must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the ForwardingRule resource to patch. */ @com.google.api.client.util.Key private java.lang.String forwardingRule; /** Name of the ForwardingRule resource to patch. */ public java.lang.String getForwardingRule() { return forwardingRule; } /** Name of the ForwardingRule resource to patch. */ public Patch setForwardingRule(java.lang.String forwardingRule) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.forwardingRule = forwardingRule; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Sets the labels on the specified resource. To learn more about labels, read the Labeling * resources documentation. * * Create a request for the method "globalForwardingRules.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/forwardingRules/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on the specified resource. To learn more about labels, read the Labeling * resources documentation. * * Create a request for the method "globalForwardingRules.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } /** * Changes target URL for the GlobalForwardingRule resource. The new target should be of the same * type as the old target. * * Create a request for the method "globalForwardingRules.setTarget". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetTarget#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param forwardingRule Name of the ForwardingRule resource in which target is to be set. * @param content the {@link com.google.api.services.compute.model.TargetReference} * @return the request */ public SetTarget setTarget(java.lang.String project, java.lang.String forwardingRule, com.google.api.services.compute.model.TargetReference content) throws java.io.IOException { SetTarget result = new SetTarget(project, forwardingRule, content); initialize(result); return result; } public class SetTarget extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/forwardingRules/{forwardingRule}/setTarget"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FORWARDING_RULE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Changes target URL for the GlobalForwardingRule resource. The new target should be of the same * type as the old target. * * Create a request for the method "globalForwardingRules.setTarget". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetTarget#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param forwardingRule Name of the ForwardingRule resource in which target is to be set. * @param content the {@link com.google.api.services.compute.model.TargetReference} * @since 1.13 */ protected SetTarget(java.lang.String project, java.lang.String forwardingRule, com.google.api.services.compute.model.TargetReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.forwardingRule = com.google.api.client.util.Preconditions.checkNotNull(forwardingRule, "Required parameter forwardingRule must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetTarget set$Xgafv(java.lang.String $Xgafv) { return (SetTarget) super.set$Xgafv($Xgafv); } @Override public SetTarget setAccessToken(java.lang.String accessToken) { return (SetTarget) super.setAccessToken(accessToken); } @Override public SetTarget setAlt(java.lang.String alt) { return (SetTarget) super.setAlt(alt); } @Override public SetTarget setCallback(java.lang.String callback) { return (SetTarget) super.setCallback(callback); } @Override public SetTarget setFields(java.lang.String fields) { return (SetTarget) super.setFields(fields); } @Override public SetTarget setKey(java.lang.String key) { return (SetTarget) super.setKey(key); } @Override public SetTarget setOauthToken(java.lang.String oauthToken) { return (SetTarget) super.setOauthToken(oauthToken); } @Override public SetTarget setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetTarget) super.setPrettyPrint(prettyPrint); } @Override public SetTarget setQuotaUser(java.lang.String quotaUser) { return (SetTarget) super.setQuotaUser(quotaUser); } @Override public SetTarget setUploadType(java.lang.String uploadType) { return (SetTarget) super.setUploadType(uploadType); } @Override public SetTarget setUploadProtocol(java.lang.String uploadProtocol) { return (SetTarget) super.setUploadProtocol(uploadProtocol); } @Override public SetTarget setUserIp(java.lang.String userIp) { return (SetTarget) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetTarget setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the ForwardingRule resource in which target is to be set. */ @com.google.api.client.util.Key private java.lang.String forwardingRule; /** Name of the ForwardingRule resource in which target is to be set. */ public java.lang.String getForwardingRule() { return forwardingRule; } /** Name of the ForwardingRule resource in which target is to be set. */ public SetTarget setForwardingRule(java.lang.String forwardingRule) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FORWARDING_RULE_PATTERN.matcher(forwardingRule).matches(), "Parameter forwardingRule must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.forwardingRule = forwardingRule; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetTarget setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetTarget set(String parameterName, Object value) { return (SetTarget) super.set(parameterName, value); } } } /** * An accessor for creating requests from the GlobalNetworkEndpointGroups collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.GlobalNetworkEndpointGroups.List request = compute.globalNetworkEndpointGroups().list(parameters ...)}
   * 
* * @return the resource collection */ public GlobalNetworkEndpointGroups globalNetworkEndpointGroups() { return new GlobalNetworkEndpointGroups(); } /** * The "globalNetworkEndpointGroups" collection of methods. */ public class GlobalNetworkEndpointGroups { /** * Attach a network endpoint to the specified network endpoint group. * * Create a request for the method "globalNetworkEndpointGroups.attachNetworkEndpoints". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AttachNetworkEndpoints#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param networkEndpointGroup The name of the network endpoint group where you are attaching network endpoints to. It should * comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.GlobalNetworkEndpointGroupsAttachEndpointsRequest} * @return the request */ public AttachNetworkEndpoints attachNetworkEndpoints(java.lang.String project, java.lang.String networkEndpointGroup, com.google.api.services.compute.model.GlobalNetworkEndpointGroupsAttachEndpointsRequest content) throws java.io.IOException { AttachNetworkEndpoints result = new AttachNetworkEndpoints(project, networkEndpointGroup, content); initialize(result); return result; } public class AttachNetworkEndpoints extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Attach a network endpoint to the specified network endpoint group. * * Create a request for the method "globalNetworkEndpointGroups.attachNetworkEndpoints". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AttachNetworkEndpoints#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param networkEndpointGroup The name of the network endpoint group where you are attaching network endpoints to. It should * comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.GlobalNetworkEndpointGroupsAttachEndpointsRequest} * @since 1.13 */ protected AttachNetworkEndpoints(java.lang.String project, java.lang.String networkEndpointGroup, com.google.api.services.compute.model.GlobalNetworkEndpointGroupsAttachEndpointsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.networkEndpointGroup = com.google.api.client.util.Preconditions.checkNotNull(networkEndpointGroup, "Required parameter networkEndpointGroup must be specified."); } @Override public AttachNetworkEndpoints set$Xgafv(java.lang.String $Xgafv) { return (AttachNetworkEndpoints) super.set$Xgafv($Xgafv); } @Override public AttachNetworkEndpoints setAccessToken(java.lang.String accessToken) { return (AttachNetworkEndpoints) super.setAccessToken(accessToken); } @Override public AttachNetworkEndpoints setAlt(java.lang.String alt) { return (AttachNetworkEndpoints) super.setAlt(alt); } @Override public AttachNetworkEndpoints setCallback(java.lang.String callback) { return (AttachNetworkEndpoints) super.setCallback(callback); } @Override public AttachNetworkEndpoints setFields(java.lang.String fields) { return (AttachNetworkEndpoints) super.setFields(fields); } @Override public AttachNetworkEndpoints setKey(java.lang.String key) { return (AttachNetworkEndpoints) super.setKey(key); } @Override public AttachNetworkEndpoints setOauthToken(java.lang.String oauthToken) { return (AttachNetworkEndpoints) super.setOauthToken(oauthToken); } @Override public AttachNetworkEndpoints setPrettyPrint(java.lang.Boolean prettyPrint) { return (AttachNetworkEndpoints) super.setPrettyPrint(prettyPrint); } @Override public AttachNetworkEndpoints setQuotaUser(java.lang.String quotaUser) { return (AttachNetworkEndpoints) super.setQuotaUser(quotaUser); } @Override public AttachNetworkEndpoints setUploadType(java.lang.String uploadType) { return (AttachNetworkEndpoints) super.setUploadType(uploadType); } @Override public AttachNetworkEndpoints setUploadProtocol(java.lang.String uploadProtocol) { return (AttachNetworkEndpoints) super.setUploadProtocol(uploadProtocol); } @Override public AttachNetworkEndpoints setUserIp(java.lang.String userIp) { return (AttachNetworkEndpoints) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AttachNetworkEndpoints setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the network endpoint group where you are attaching network endpoints to. It * should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String networkEndpointGroup; /** The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035. */ public java.lang.String getNetworkEndpointGroup() { return networkEndpointGroup; } /** * The name of the network endpoint group where you are attaching network endpoints to. It * should comply with RFC1035. */ public AttachNetworkEndpoints setNetworkEndpointGroup(java.lang.String networkEndpointGroup) { this.networkEndpointGroup = networkEndpointGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AttachNetworkEndpoints setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AttachNetworkEndpoints set(String parameterName, Object value) { return (AttachNetworkEndpoints) super.set(parameterName, value); } } /** * Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are * backend services referencing it. * * Create a request for the method "globalNetworkEndpointGroups.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param networkEndpointGroup The name of the network endpoint group to delete. It should comply with RFC1035. * @return the request */ public Delete delete(java.lang.String project, java.lang.String networkEndpointGroup) throws java.io.IOException { Delete result = new Delete(project, networkEndpointGroup); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are * backend services referencing it. * * Create a request for the method "globalNetworkEndpointGroups.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param networkEndpointGroup The name of the network endpoint group to delete. It should comply with RFC1035. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String networkEndpointGroup) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.networkEndpointGroup = com.google.api.client.util.Preconditions.checkNotNull(networkEndpointGroup, "Required parameter networkEndpointGroup must be specified."); } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the network endpoint group to delete. It should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String networkEndpointGroup; /** The name of the network endpoint group to delete. It should comply with RFC1035. */ public java.lang.String getNetworkEndpointGroup() { return networkEndpointGroup; } /** The name of the network endpoint group to delete. It should comply with RFC1035. */ public Delete setNetworkEndpointGroup(java.lang.String networkEndpointGroup) { this.networkEndpointGroup = networkEndpointGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Detach the network endpoint from the specified network endpoint group. * * Create a request for the method "globalNetworkEndpointGroups.detachNetworkEndpoints". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link DetachNetworkEndpoints#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param networkEndpointGroup The name of the network endpoint group where you are removing network endpoints. It should comply * with RFC1035. * @param content the {@link com.google.api.services.compute.model.GlobalNetworkEndpointGroupsDetachEndpointsRequest} * @return the request */ public DetachNetworkEndpoints detachNetworkEndpoints(java.lang.String project, java.lang.String networkEndpointGroup, com.google.api.services.compute.model.GlobalNetworkEndpointGroupsDetachEndpointsRequest content) throws java.io.IOException { DetachNetworkEndpoints result = new DetachNetworkEndpoints(project, networkEndpointGroup, content); initialize(result); return result; } public class DetachNetworkEndpoints extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Detach the network endpoint from the specified network endpoint group. * * Create a request for the method "globalNetworkEndpointGroups.detachNetworkEndpoints". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link DetachNetworkEndpoints#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param networkEndpointGroup The name of the network endpoint group where you are removing network endpoints. It should comply * with RFC1035. * @param content the {@link com.google.api.services.compute.model.GlobalNetworkEndpointGroupsDetachEndpointsRequest} * @since 1.13 */ protected DetachNetworkEndpoints(java.lang.String project, java.lang.String networkEndpointGroup, com.google.api.services.compute.model.GlobalNetworkEndpointGroupsDetachEndpointsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.networkEndpointGroup = com.google.api.client.util.Preconditions.checkNotNull(networkEndpointGroup, "Required parameter networkEndpointGroup must be specified."); } @Override public DetachNetworkEndpoints set$Xgafv(java.lang.String $Xgafv) { return (DetachNetworkEndpoints) super.set$Xgafv($Xgafv); } @Override public DetachNetworkEndpoints setAccessToken(java.lang.String accessToken) { return (DetachNetworkEndpoints) super.setAccessToken(accessToken); } @Override public DetachNetworkEndpoints setAlt(java.lang.String alt) { return (DetachNetworkEndpoints) super.setAlt(alt); } @Override public DetachNetworkEndpoints setCallback(java.lang.String callback) { return (DetachNetworkEndpoints) super.setCallback(callback); } @Override public DetachNetworkEndpoints setFields(java.lang.String fields) { return (DetachNetworkEndpoints) super.setFields(fields); } @Override public DetachNetworkEndpoints setKey(java.lang.String key) { return (DetachNetworkEndpoints) super.setKey(key); } @Override public DetachNetworkEndpoints setOauthToken(java.lang.String oauthToken) { return (DetachNetworkEndpoints) super.setOauthToken(oauthToken); } @Override public DetachNetworkEndpoints setPrettyPrint(java.lang.Boolean prettyPrint) { return (DetachNetworkEndpoints) super.setPrettyPrint(prettyPrint); } @Override public DetachNetworkEndpoints setQuotaUser(java.lang.String quotaUser) { return (DetachNetworkEndpoints) super.setQuotaUser(quotaUser); } @Override public DetachNetworkEndpoints setUploadType(java.lang.String uploadType) { return (DetachNetworkEndpoints) super.setUploadType(uploadType); } @Override public DetachNetworkEndpoints setUploadProtocol(java.lang.String uploadProtocol) { return (DetachNetworkEndpoints) super.setUploadProtocol(uploadProtocol); } @Override public DetachNetworkEndpoints setUserIp(java.lang.String userIp) { return (DetachNetworkEndpoints) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public DetachNetworkEndpoints setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the network endpoint group where you are removing network endpoints. It should * comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String networkEndpointGroup; /** The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035. */ public java.lang.String getNetworkEndpointGroup() { return networkEndpointGroup; } /** * The name of the network endpoint group where you are removing network endpoints. It should * comply with RFC1035. */ public DetachNetworkEndpoints setNetworkEndpointGroup(java.lang.String networkEndpointGroup) { this.networkEndpointGroup = networkEndpointGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public DetachNetworkEndpoints setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public DetachNetworkEndpoints set(String parameterName, Object value) { return (DetachNetworkEndpoints) super.set(parameterName, value); } } /** * Returns the specified network endpoint group. * * Create a request for the method "globalNetworkEndpointGroups.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param networkEndpointGroup The name of the network endpoint group. It should comply with RFC1035. * @return the request */ public Get get(java.lang.String project, java.lang.String networkEndpointGroup) throws java.io.IOException { Get result = new Get(project, networkEndpointGroup); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Returns the specified network endpoint group. * * Create a request for the method "globalNetworkEndpointGroups.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param networkEndpointGroup The name of the network endpoint group. It should comply with RFC1035. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String networkEndpointGroup) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NetworkEndpointGroup.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.networkEndpointGroup = com.google.api.client.util.Preconditions.checkNotNull(networkEndpointGroup, "Required parameter networkEndpointGroup must be specified."); } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the network endpoint group. It should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String networkEndpointGroup; /** The name of the network endpoint group. It should comply with RFC1035. */ public java.lang.String getNetworkEndpointGroup() { return networkEndpointGroup; } /** The name of the network endpoint group. It should comply with RFC1035. */ public Get setNetworkEndpointGroup(java.lang.String networkEndpointGroup) { this.networkEndpointGroup = networkEndpointGroup; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a network endpoint group in the specified project using the parameters that are included * in the request. * * Create a request for the method "globalNetworkEndpointGroups.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.NetworkEndpointGroup} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.NetworkEndpointGroup content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networkEndpointGroups"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a network endpoint group in the specified project using the parameters that are * included in the request. * * Create a request for the method "globalNetworkEndpointGroups.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.NetworkEndpointGroup} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.NetworkEndpointGroup content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of network endpoint groups that are located in the specified project. * * Create a request for the method "globalNetworkEndpointGroups.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networkEndpointGroups"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of network endpoint groups that are located in the specified project. * * Create a request for the method "globalNetworkEndpointGroups.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NetworkEndpointGroupList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Lists the network endpoints in the specified network endpoint group. * * Create a request for the method "globalNetworkEndpointGroups.listNetworkEndpoints". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListNetworkEndpoints#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param networkEndpointGroup The name of the network endpoint group from which you want to generate a list of included network * endpoints. It should comply with RFC1035. * @return the request */ public ListNetworkEndpoints listNetworkEndpoints(java.lang.String project, java.lang.String networkEndpointGroup) throws java.io.IOException { ListNetworkEndpoints result = new ListNetworkEndpoints(project, networkEndpointGroup); initialize(result); return result; } public class ListNetworkEndpoints extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists the network endpoints in the specified network endpoint group. * * Create a request for the method "globalNetworkEndpointGroups.listNetworkEndpoints". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListNetworkEndpoints#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param networkEndpointGroup The name of the network endpoint group from which you want to generate a list of included network * endpoints. It should comply with RFC1035. * @since 1.13 */ protected ListNetworkEndpoints(java.lang.String project, java.lang.String networkEndpointGroup) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.NetworkEndpointGroupsListNetworkEndpoints.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.networkEndpointGroup = com.google.api.client.util.Preconditions.checkNotNull(networkEndpointGroup, "Required parameter networkEndpointGroup must be specified."); } @Override public ListNetworkEndpoints set$Xgafv(java.lang.String $Xgafv) { return (ListNetworkEndpoints) super.set$Xgafv($Xgafv); } @Override public ListNetworkEndpoints setAccessToken(java.lang.String accessToken) { return (ListNetworkEndpoints) super.setAccessToken(accessToken); } @Override public ListNetworkEndpoints setAlt(java.lang.String alt) { return (ListNetworkEndpoints) super.setAlt(alt); } @Override public ListNetworkEndpoints setCallback(java.lang.String callback) { return (ListNetworkEndpoints) super.setCallback(callback); } @Override public ListNetworkEndpoints setFields(java.lang.String fields) { return (ListNetworkEndpoints) super.setFields(fields); } @Override public ListNetworkEndpoints setKey(java.lang.String key) { return (ListNetworkEndpoints) super.setKey(key); } @Override public ListNetworkEndpoints setOauthToken(java.lang.String oauthToken) { return (ListNetworkEndpoints) super.setOauthToken(oauthToken); } @Override public ListNetworkEndpoints setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListNetworkEndpoints) super.setPrettyPrint(prettyPrint); } @Override public ListNetworkEndpoints setQuotaUser(java.lang.String quotaUser) { return (ListNetworkEndpoints) super.setQuotaUser(quotaUser); } @Override public ListNetworkEndpoints setUploadType(java.lang.String uploadType) { return (ListNetworkEndpoints) super.setUploadType(uploadType); } @Override public ListNetworkEndpoints setUploadProtocol(java.lang.String uploadProtocol) { return (ListNetworkEndpoints) super.setUploadProtocol(uploadProtocol); } @Override public ListNetworkEndpoints setUserIp(java.lang.String userIp) { return (ListNetworkEndpoints) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListNetworkEndpoints setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the network endpoint group from which you want to generate a list of included * network endpoints. It should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String networkEndpointGroup; /** The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035. */ public java.lang.String getNetworkEndpointGroup() { return networkEndpointGroup; } /** * The name of the network endpoint group from which you want to generate a list of included * network endpoints. It should comply with RFC1035. */ public ListNetworkEndpoints setNetworkEndpointGroup(java.lang.String networkEndpointGroup) { this.networkEndpointGroup = networkEndpointGroup; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListNetworkEndpoints setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListNetworkEndpoints setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListNetworkEndpoints setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListNetworkEndpoints setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListNetworkEndpoints setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListNetworkEndpoints set(String parameterName, Object value) { return (ListNetworkEndpoints) super.set(parameterName, value); } } } /** * An accessor for creating requests from the GlobalOperations collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.GlobalOperations.List request = compute.globalOperations().list(parameters ...)}
   * 
* * @return the resource collection */ public GlobalOperations globalOperations() { return new GlobalOperations(); } /** * The "globalOperations" collection of methods. */ public class GlobalOperations { /** * Retrieves an aggregated list of all operations. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "globalOperations.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/operations"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of all operations. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "globalOperations.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.OperationAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified Operations resource. * * Create a request for the method "globalOperations.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param operation Name of the Operations resource to delete, or its unique numeric identifier. * @return the request */ public Delete delete(java.lang.String project, java.lang.String operation) throws java.io.IOException { Delete result = new Delete(project, operation); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/operations/{operation}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern OPERATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified Operations resource. * * Create a request for the method "globalOperations.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param operation Name of the Operations resource to delete, or its unique numeric identifier. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String operation) { super(Compute.this, "DELETE", REST_PATH, null, Void.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.operation = com.google.api.client.util.Preconditions.checkNotNull(operation, "Required parameter operation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the Operations resource to delete, or its unique numeric identifier. */ @com.google.api.client.util.Key private java.lang.String operation; /** Name of the Operations resource to delete, or its unique numeric identifier. */ public java.lang.String getOperation() { return operation; } /** Name of the Operations resource to delete, or its unique numeric identifier. */ public Delete setOperation(java.lang.String operation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.operation = operation; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves the specified Operations resource. * * Create a request for the method "globalOperations.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param operation Name of the Operations resource to return, or its unique numeric identifier. * @return the request */ public Get get(java.lang.String project, java.lang.String operation) throws java.io.IOException { Get result = new Get(project, operation); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/operations/{operation}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern OPERATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Retrieves the specified Operations resource. * * Create a request for the method "globalOperations.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param operation Name of the Operations resource to return, or its unique numeric identifier. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String operation) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.operation = com.google.api.client.util.Preconditions.checkNotNull(operation, "Required parameter operation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the Operations resource to return, or its unique numeric identifier. */ @com.google.api.client.util.Key private java.lang.String operation; /** Name of the Operations resource to return, or its unique numeric identifier. */ public java.lang.String getOperation() { return operation; } /** Name of the Operations resource to return, or its unique numeric identifier. */ public Get setOperation(java.lang.String operation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.operation = operation; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves a list of Operation resources contained within the specified project. * * Create a request for the method "globalOperations.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/operations"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves a list of Operation resources contained within the specified project. * * Create a request for the method "globalOperations.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.OperationList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Waits for the specified Operation resource to return as `DONE` or for the request to approach the * 2 minute deadline, and retrieves the specified Operation resource. This method differs from the * `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns * the current state of the operation, which might be `DONE` or still in progress. This method is * called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, * the request might return before the default deadline is reached, or might return after zero * seconds. - If the default deadline is reached, there is no guarantee that the operation is * actually done when the method returns. Be prepared to retry if the operation is not `DONE`. * * Create a request for the method "globalOperations.wait". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Wait#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param operation Name of the Operations resource to return, or its unique numeric identifier. * @return the request */ public Wait wait(java.lang.String project, java.lang.String operation) throws java.io.IOException { Wait result = new Wait(project, operation); initialize(result); return result; } public class Wait extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/operations/{operation}/wait"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern OPERATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Waits for the specified Operation resource to return as `DONE` or for the request to approach * the 2 minute deadline, and retrieves the specified Operation resource. This method differs from * the `GET` method in that it waits for no more than the default deadline (2 minutes) and then * returns the current state of the operation, which might be `DONE` or still in progress. This * method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is * overloaded, the request might return before the default deadline is reached, or might return * after zero seconds. - If the default deadline is reached, there is no guarantee that the * operation is actually done when the method returns. Be prepared to retry if the operation is * not `DONE`. * * Create a request for the method "globalOperations.wait". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Wait#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param operation Name of the Operations resource to return, or its unique numeric identifier. * @since 1.13 */ protected Wait(java.lang.String project, java.lang.String operation) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.operation = com.google.api.client.util.Preconditions.checkNotNull(operation, "Required parameter operation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Wait set$Xgafv(java.lang.String $Xgafv) { return (Wait) super.set$Xgafv($Xgafv); } @Override public Wait setAccessToken(java.lang.String accessToken) { return (Wait) super.setAccessToken(accessToken); } @Override public Wait setAlt(java.lang.String alt) { return (Wait) super.setAlt(alt); } @Override public Wait setCallback(java.lang.String callback) { return (Wait) super.setCallback(callback); } @Override public Wait setFields(java.lang.String fields) { return (Wait) super.setFields(fields); } @Override public Wait setKey(java.lang.String key) { return (Wait) super.setKey(key); } @Override public Wait setOauthToken(java.lang.String oauthToken) { return (Wait) super.setOauthToken(oauthToken); } @Override public Wait setPrettyPrint(java.lang.Boolean prettyPrint) { return (Wait) super.setPrettyPrint(prettyPrint); } @Override public Wait setQuotaUser(java.lang.String quotaUser) { return (Wait) super.setQuotaUser(quotaUser); } @Override public Wait setUploadType(java.lang.String uploadType) { return (Wait) super.setUploadType(uploadType); } @Override public Wait setUploadProtocol(java.lang.String uploadProtocol) { return (Wait) super.setUploadProtocol(uploadProtocol); } @Override public Wait setUserIp(java.lang.String userIp) { return (Wait) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Wait setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the Operations resource to return, or its unique numeric identifier. */ @com.google.api.client.util.Key private java.lang.String operation; /** Name of the Operations resource to return, or its unique numeric identifier. */ public java.lang.String getOperation() { return operation; } /** Name of the Operations resource to return, or its unique numeric identifier. */ public Wait setOperation(java.lang.String operation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.operation = operation; return this; } @Override public Wait set(String parameterName, Object value) { return (Wait) super.set(parameterName, value); } } } /** * An accessor for creating requests from the GlobalOrganizationOperations collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.GlobalOrganizationOperations.List request = compute.globalOrganizationOperations().list(parameters ...)}
   * 
* * @return the resource collection */ public GlobalOrganizationOperations globalOrganizationOperations() { return new GlobalOrganizationOperations(); } /** * The "globalOrganizationOperations" collection of methods. */ public class GlobalOrganizationOperations { /** * Deletes the specified Operations resource. * * Create a request for the method "globalOrganizationOperations.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param operation Name of the Operations resource to delete, or its unique numeric identifier. * @return the request */ public Delete delete(java.lang.String operation) throws java.io.IOException { Delete result = new Delete(operation); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "locations/global/operations/{operation}"; private final java.util.regex.Pattern OPERATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified Operations resource. * * Create a request for the method "globalOrganizationOperations.delete". * * This request holds the parameters needed by the the compute 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 operation Name of the Operations resource to delete, or its unique numeric identifier. * @since 1.13 */ protected Delete(java.lang.String operation) { super(Compute.this, "DELETE", REST_PATH, null, Void.class); this.operation = com.google.api.client.util.Preconditions.checkNotNull(operation, "Required parameter operation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Name of the Operations resource to delete, or its unique numeric identifier. */ @com.google.api.client.util.Key private java.lang.String operation; /** Name of the Operations resource to delete, or its unique numeric identifier. */ public java.lang.String getOperation() { return operation; } /** Name of the Operations resource to delete, or its unique numeric identifier. */ public Delete setOperation(java.lang.String operation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.operation = operation; return this; } /** Parent ID for this request. */ @com.google.api.client.util.Key private java.lang.String parentId; /** Parent ID for this request. */ public java.lang.String getParentId() { return parentId; } /** Parent ID for this request. */ public Delete setParentId(java.lang.String parentId) { this.parentId = parentId; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves the specified Operations resource. Gets a list of operations by making a `list()` * request. * * Create a request for the method "globalOrganizationOperations.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param operation Name of the Operations resource to return, or its unique numeric identifier. * @return the request */ public Get get(java.lang.String operation) throws java.io.IOException { Get result = new Get(operation); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "locations/global/operations/{operation}"; private final java.util.regex.Pattern OPERATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Retrieves the specified Operations resource. Gets a list of operations by making a `list()` * request. * * Create a request for the method "globalOrganizationOperations.get". * * This request holds the parameters needed by the the compute 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 operation Name of the Operations resource to return, or its unique numeric identifier. * @since 1.13 */ protected Get(java.lang.String operation) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.operation = com.google.api.client.util.Preconditions.checkNotNull(operation, "Required parameter operation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Name of the Operations resource to return, or its unique numeric identifier. */ @com.google.api.client.util.Key private java.lang.String operation; /** Name of the Operations resource to return, or its unique numeric identifier. */ public java.lang.String getOperation() { return operation; } /** Name of the Operations resource to return, or its unique numeric identifier. */ public Get setOperation(java.lang.String operation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.operation = operation; return this; } /** Parent ID for this request. */ @com.google.api.client.util.Key private java.lang.String parentId; /** Parent ID for this request. */ public java.lang.String getParentId() { return parentId; } /** Parent ID for this request. */ public Get setParentId(java.lang.String parentId) { this.parentId = parentId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves a list of Operation resources contained within the specified organization. * * Create a request for the method "globalOrganizationOperations.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @return the request */ public List list() throws java.io.IOException { List result = new List(); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "locations/global/operations"; /** * Retrieves a list of Operation resources contained within the specified organization. * * Create a request for the method "globalOrganizationOperations.list". * * This request holds the parameters needed by the the compute 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.

* * @since 1.13 */ protected List() { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.OperationList.class); } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** Parent ID for this request. */ @com.google.api.client.util.Key private java.lang.String parentId; /** Parent ID for this request. */ public java.lang.String getParentId() { return parentId; } /** Parent ID for this request. */ public List setParentId(java.lang.String parentId) { this.parentId = parentId; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the GlobalPublicDelegatedPrefixes collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.GlobalPublicDelegatedPrefixes.List request = compute.globalPublicDelegatedPrefixes().list(parameters ...)}
   * 
* * @return the resource collection */ public GlobalPublicDelegatedPrefixes globalPublicDelegatedPrefixes() { return new GlobalPublicDelegatedPrefixes(); } /** * The "globalPublicDelegatedPrefixes" collection of methods. */ public class GlobalPublicDelegatedPrefixes { /** * Deletes the specified global PublicDelegatedPrefix. * * Create a request for the method "globalPublicDelegatedPrefixes.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param publicDelegatedPrefix Name of the PublicDelegatedPrefix resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String publicDelegatedPrefix) throws java.io.IOException { Delete result = new Delete(project, publicDelegatedPrefix); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern PUBLIC_DELEGATED_PREFIX_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified global PublicDelegatedPrefix. * * Create a request for the method "globalPublicDelegatedPrefixes.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param publicDelegatedPrefix Name of the PublicDelegatedPrefix resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String publicDelegatedPrefix) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.publicDelegatedPrefix = com.google.api.client.util.Preconditions.checkNotNull(publicDelegatedPrefix, "Required parameter publicDelegatedPrefix must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_DELEGATED_PREFIX_PATTERN.matcher(publicDelegatedPrefix).matches(), "Parameter publicDelegatedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the PublicDelegatedPrefix resource to delete. */ @com.google.api.client.util.Key private java.lang.String publicDelegatedPrefix; /** Name of the PublicDelegatedPrefix resource to delete. */ public java.lang.String getPublicDelegatedPrefix() { return publicDelegatedPrefix; } /** Name of the PublicDelegatedPrefix resource to delete. */ public Delete setPublicDelegatedPrefix(java.lang.String publicDelegatedPrefix) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_DELEGATED_PREFIX_PATTERN.matcher(publicDelegatedPrefix).matches(), "Parameter publicDelegatedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.publicDelegatedPrefix = publicDelegatedPrefix; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified global PublicDelegatedPrefix resource. * * Create a request for the method "globalPublicDelegatedPrefixes.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param publicDelegatedPrefix Name of the PublicDelegatedPrefix resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String publicDelegatedPrefix) throws java.io.IOException { Get result = new Get(project, publicDelegatedPrefix); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern PUBLIC_DELEGATED_PREFIX_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified global PublicDelegatedPrefix resource. * * Create a request for the method "globalPublicDelegatedPrefixes.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param publicDelegatedPrefix Name of the PublicDelegatedPrefix resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String publicDelegatedPrefix) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.PublicDelegatedPrefix.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.publicDelegatedPrefix = com.google.api.client.util.Preconditions.checkNotNull(publicDelegatedPrefix, "Required parameter publicDelegatedPrefix must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_DELEGATED_PREFIX_PATTERN.matcher(publicDelegatedPrefix).matches(), "Parameter publicDelegatedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the PublicDelegatedPrefix resource to return. */ @com.google.api.client.util.Key private java.lang.String publicDelegatedPrefix; /** Name of the PublicDelegatedPrefix resource to return. */ public java.lang.String getPublicDelegatedPrefix() { return publicDelegatedPrefix; } /** Name of the PublicDelegatedPrefix resource to return. */ public Get setPublicDelegatedPrefix(java.lang.String publicDelegatedPrefix) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_DELEGATED_PREFIX_PATTERN.matcher(publicDelegatedPrefix).matches(), "Parameter publicDelegatedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.publicDelegatedPrefix = publicDelegatedPrefix; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a global PublicDelegatedPrefix in the specified project using the parameters that are * included in the request. * * Create a request for the method "globalPublicDelegatedPrefixes.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.PublicDelegatedPrefix} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.PublicDelegatedPrefix content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/publicDelegatedPrefixes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a global PublicDelegatedPrefix in the specified project using the parameters that are * included in the request. * * Create a request for the method "globalPublicDelegatedPrefixes.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.PublicDelegatedPrefix} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.PublicDelegatedPrefix content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists the global PublicDelegatedPrefixes for a project. * * Create a request for the method "globalPublicDelegatedPrefixes.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/publicDelegatedPrefixes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists the global PublicDelegatedPrefixes for a project. * * Create a request for the method "globalPublicDelegatedPrefixes.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.PublicDelegatedPrefixList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified global PublicDelegatedPrefix resource with the data included in the * request. This method supports PATCH semantics and uses JSON merge patch format and processing * rules. * * Create a request for the method "globalPublicDelegatedPrefixes.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param publicDelegatedPrefix Name of the PublicDelegatedPrefix resource to patch. * @param content the {@link com.google.api.services.compute.model.PublicDelegatedPrefix} * @return the request */ public Patch patch(java.lang.String project, java.lang.String publicDelegatedPrefix, com.google.api.services.compute.model.PublicDelegatedPrefix content) throws java.io.IOException { Patch result = new Patch(project, publicDelegatedPrefix, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern PUBLIC_DELEGATED_PREFIX_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified global PublicDelegatedPrefix resource with the data included in the * request. This method supports PATCH semantics and uses JSON merge patch format and processing * rules. * * Create a request for the method "globalPublicDelegatedPrefixes.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param publicDelegatedPrefix Name of the PublicDelegatedPrefix resource to patch. * @param content the {@link com.google.api.services.compute.model.PublicDelegatedPrefix} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String publicDelegatedPrefix, com.google.api.services.compute.model.PublicDelegatedPrefix content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.publicDelegatedPrefix = com.google.api.client.util.Preconditions.checkNotNull(publicDelegatedPrefix, "Required parameter publicDelegatedPrefix must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_DELEGATED_PREFIX_PATTERN.matcher(publicDelegatedPrefix).matches(), "Parameter publicDelegatedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the PublicDelegatedPrefix resource to patch. */ @com.google.api.client.util.Key private java.lang.String publicDelegatedPrefix; /** Name of the PublicDelegatedPrefix resource to patch. */ public java.lang.String getPublicDelegatedPrefix() { return publicDelegatedPrefix; } /** Name of the PublicDelegatedPrefix resource to patch. */ public Patch setPublicDelegatedPrefix(java.lang.String publicDelegatedPrefix) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_DELEGATED_PREFIX_PATTERN.matcher(publicDelegatedPrefix).matches(), "Parameter publicDelegatedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.publicDelegatedPrefix = publicDelegatedPrefix; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } } /** * An accessor for creating requests from the HealthChecks collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.HealthChecks.List request = compute.healthChecks().list(parameters ...)}
   * 
* * @return the resource collection */ public HealthChecks healthChecks() { return new HealthChecks(); } /** * The "healthChecks" collection of methods. */ public class HealthChecks { /** * Retrieves the list of all HealthCheck resources, regional and global, available to the specified * project. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter * to `true`. * * Create a request for the method "healthChecks.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Name of the project scoping this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/healthChecks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of all HealthCheck resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the * `returnPartialSuccess` parameter to `true`. * * Create a request for the method "healthChecks.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Name of the project scoping this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.HealthChecksAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Name of the project scoping this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Name of the project scoping this request. */ public java.lang.String getProject() { return project; } /** Name of the project scoping this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified HealthCheck resource. * * Create a request for the method "healthChecks.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param healthCheck Name of the HealthCheck resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String healthCheck) throws java.io.IOException { Delete result = new Delete(project, healthCheck); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/healthChecks/{healthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified HealthCheck resource. * * Create a request for the method "healthChecks.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param healthCheck Name of the HealthCheck resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String healthCheck) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.healthCheck = com.google.api.client.util.Preconditions.checkNotNull(healthCheck, "Required parameter healthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the HealthCheck resource to delete. */ @com.google.api.client.util.Key private java.lang.String healthCheck; /** Name of the HealthCheck resource to delete. */ public java.lang.String getHealthCheck() { return healthCheck; } /** Name of the HealthCheck resource to delete. */ public Delete setHealthCheck(java.lang.String healthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.healthCheck = healthCheck; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified HealthCheck resource. * * Create a request for the method "healthChecks.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param healthCheck Name of the HealthCheck resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String healthCheck) throws java.io.IOException { Get result = new Get(project, healthCheck); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/healthChecks/{healthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified HealthCheck resource. * * Create a request for the method "healthChecks.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param healthCheck Name of the HealthCheck resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String healthCheck) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.HealthCheck.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.healthCheck = com.google.api.client.util.Preconditions.checkNotNull(healthCheck, "Required parameter healthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the HealthCheck resource to return. */ @com.google.api.client.util.Key private java.lang.String healthCheck; /** Name of the HealthCheck resource to return. */ public java.lang.String getHealthCheck() { return healthCheck; } /** Name of the HealthCheck resource to return. */ public Get setHealthCheck(java.lang.String healthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.healthCheck = healthCheck; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a HealthCheck resource in the specified project using the data included in the request. * * Create a request for the method "healthChecks.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.HealthCheck} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.HealthCheck content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/healthChecks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a HealthCheck resource in the specified project using the data included in the request. * * Create a request for the method "healthChecks.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.HealthCheck} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.HealthCheck content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of HealthCheck resources available to the specified project. * * Create a request for the method "healthChecks.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/healthChecks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of HealthCheck resources available to the specified project. * * Create a request for the method "healthChecks.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.HealthCheckList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates a HealthCheck resource in the specified project using the data included in the request. * This method supports PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "healthChecks.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param healthCheck Name of the HealthCheck resource to patch. * @param content the {@link com.google.api.services.compute.model.HealthCheck} * @return the request */ public Patch patch(java.lang.String project, java.lang.String healthCheck, com.google.api.services.compute.model.HealthCheck content) throws java.io.IOException { Patch result = new Patch(project, healthCheck, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/healthChecks/{healthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates a HealthCheck resource in the specified project using the data included in the request. * This method supports PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "healthChecks.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param healthCheck Name of the HealthCheck resource to patch. * @param content the {@link com.google.api.services.compute.model.HealthCheck} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String healthCheck, com.google.api.services.compute.model.HealthCheck content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.healthCheck = com.google.api.client.util.Preconditions.checkNotNull(healthCheck, "Required parameter healthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the HealthCheck resource to patch. */ @com.google.api.client.util.Key private java.lang.String healthCheck; /** Name of the HealthCheck resource to patch. */ public java.lang.String getHealthCheck() { return healthCheck; } /** Name of the HealthCheck resource to patch. */ public Patch setHealthCheck(java.lang.String healthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.healthCheck = healthCheck; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates a HealthCheck resource in the specified project using the data included in the request. * * Create a request for the method "healthChecks.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param healthCheck Name of the HealthCheck resource to update. * @param content the {@link com.google.api.services.compute.model.HealthCheck} * @return the request */ public Update update(java.lang.String project, java.lang.String healthCheck, com.google.api.services.compute.model.HealthCheck content) throws java.io.IOException { Update result = new Update(project, healthCheck, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/healthChecks/{healthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates a HealthCheck resource in the specified project using the data included in the request. * * Create a request for the method "healthChecks.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param healthCheck Name of the HealthCheck resource to update. * @param content the {@link com.google.api.services.compute.model.HealthCheck} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String healthCheck, com.google.api.services.compute.model.HealthCheck content) { super(Compute.this, "PUT", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.healthCheck = com.google.api.client.util.Preconditions.checkNotNull(healthCheck, "Required parameter healthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the HealthCheck resource to update. */ @com.google.api.client.util.Key private java.lang.String healthCheck; /** Name of the HealthCheck resource to update. */ public java.lang.String getHealthCheck() { return healthCheck; } /** Name of the HealthCheck resource to update. */ public Update setHealthCheck(java.lang.String healthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.healthCheck = healthCheck; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the HttpHealthChecks collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.HttpHealthChecks.List request = compute.httpHealthChecks().list(parameters ...)}
   * 
* * @return the resource collection */ public HttpHealthChecks httpHealthChecks() { return new HttpHealthChecks(); } /** * The "httpHealthChecks" collection of methods. */ public class HttpHealthChecks { /** * Deletes the specified HttpHealthCheck resource. * * Create a request for the method "httpHealthChecks.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param httpHealthCheck Name of the HttpHealthCheck resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String httpHealthCheck) throws java.io.IOException { Delete result = new Delete(project, httpHealthCheck); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/httpHealthChecks/{httpHealthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern HTTP_HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified HttpHealthCheck resource. * * Create a request for the method "httpHealthChecks.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param httpHealthCheck Name of the HttpHealthCheck resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String httpHealthCheck) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.httpHealthCheck = com.google.api.client.util.Preconditions.checkNotNull(httpHealthCheck, "Required parameter httpHealthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTP_HEALTH_CHECK_PATTERN.matcher(httpHealthCheck).matches(), "Parameter httpHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the HttpHealthCheck resource to delete. */ @com.google.api.client.util.Key private java.lang.String httpHealthCheck; /** Name of the HttpHealthCheck resource to delete. */ public java.lang.String getHttpHealthCheck() { return httpHealthCheck; } /** Name of the HttpHealthCheck resource to delete. */ public Delete setHttpHealthCheck(java.lang.String httpHealthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTP_HEALTH_CHECK_PATTERN.matcher(httpHealthCheck).matches(), "Parameter httpHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.httpHealthCheck = httpHealthCheck; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified HttpHealthCheck resource. * * Create a request for the method "httpHealthChecks.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param httpHealthCheck Name of the HttpHealthCheck resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String httpHealthCheck) throws java.io.IOException { Get result = new Get(project, httpHealthCheck); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/httpHealthChecks/{httpHealthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern HTTP_HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified HttpHealthCheck resource. * * Create a request for the method "httpHealthChecks.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param httpHealthCheck Name of the HttpHealthCheck resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String httpHealthCheck) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.HttpHealthCheck.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.httpHealthCheck = com.google.api.client.util.Preconditions.checkNotNull(httpHealthCheck, "Required parameter httpHealthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTP_HEALTH_CHECK_PATTERN.matcher(httpHealthCheck).matches(), "Parameter httpHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the HttpHealthCheck resource to return. */ @com.google.api.client.util.Key private java.lang.String httpHealthCheck; /** Name of the HttpHealthCheck resource to return. */ public java.lang.String getHttpHealthCheck() { return httpHealthCheck; } /** Name of the HttpHealthCheck resource to return. */ public Get setHttpHealthCheck(java.lang.String httpHealthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTP_HEALTH_CHECK_PATTERN.matcher(httpHealthCheck).matches(), "Parameter httpHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.httpHealthCheck = httpHealthCheck; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a HttpHealthCheck resource in the specified project using the data included in the * request. * * Create a request for the method "httpHealthChecks.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.HttpHealthCheck} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.HttpHealthCheck content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/httpHealthChecks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a HttpHealthCheck resource in the specified project using the data included in the * request. * * Create a request for the method "httpHealthChecks.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.HttpHealthCheck} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.HttpHealthCheck content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of HttpHealthCheck resources available to the specified project. * * Create a request for the method "httpHealthChecks.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/httpHealthChecks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of HttpHealthCheck resources available to the specified project. * * Create a request for the method "httpHealthChecks.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.HttpHealthCheckList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates a HttpHealthCheck resource in the specified project using the data included in the * request. This method supports PATCH semantics and uses the JSON merge patch format and processing * rules. * * Create a request for the method "httpHealthChecks.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param httpHealthCheck Name of the HttpHealthCheck resource to patch. * @param content the {@link com.google.api.services.compute.model.HttpHealthCheck} * @return the request */ public Patch patch(java.lang.String project, java.lang.String httpHealthCheck, com.google.api.services.compute.model.HttpHealthCheck content) throws java.io.IOException { Patch result = new Patch(project, httpHealthCheck, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/httpHealthChecks/{httpHealthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern HTTP_HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates a HttpHealthCheck resource in the specified project using the data included in the * request. This method supports PATCH semantics and uses the JSON merge patch format and * processing rules. * * Create a request for the method "httpHealthChecks.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param httpHealthCheck Name of the HttpHealthCheck resource to patch. * @param content the {@link com.google.api.services.compute.model.HttpHealthCheck} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String httpHealthCheck, com.google.api.services.compute.model.HttpHealthCheck content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.httpHealthCheck = com.google.api.client.util.Preconditions.checkNotNull(httpHealthCheck, "Required parameter httpHealthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTP_HEALTH_CHECK_PATTERN.matcher(httpHealthCheck).matches(), "Parameter httpHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the HttpHealthCheck resource to patch. */ @com.google.api.client.util.Key private java.lang.String httpHealthCheck; /** Name of the HttpHealthCheck resource to patch. */ public java.lang.String getHttpHealthCheck() { return httpHealthCheck; } /** Name of the HttpHealthCheck resource to patch. */ public Patch setHttpHealthCheck(java.lang.String httpHealthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTP_HEALTH_CHECK_PATTERN.matcher(httpHealthCheck).matches(), "Parameter httpHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.httpHealthCheck = httpHealthCheck; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates a HttpHealthCheck resource in the specified project using the data included in the * request. * * Create a request for the method "httpHealthChecks.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param httpHealthCheck Name of the HttpHealthCheck resource to update. * @param content the {@link com.google.api.services.compute.model.HttpHealthCheck} * @return the request */ public Update update(java.lang.String project, java.lang.String httpHealthCheck, com.google.api.services.compute.model.HttpHealthCheck content) throws java.io.IOException { Update result = new Update(project, httpHealthCheck, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/httpHealthChecks/{httpHealthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern HTTP_HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates a HttpHealthCheck resource in the specified project using the data included in the * request. * * Create a request for the method "httpHealthChecks.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param httpHealthCheck Name of the HttpHealthCheck resource to update. * @param content the {@link com.google.api.services.compute.model.HttpHealthCheck} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String httpHealthCheck, com.google.api.services.compute.model.HttpHealthCheck content) { super(Compute.this, "PUT", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.httpHealthCheck = com.google.api.client.util.Preconditions.checkNotNull(httpHealthCheck, "Required parameter httpHealthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTP_HEALTH_CHECK_PATTERN.matcher(httpHealthCheck).matches(), "Parameter httpHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the HttpHealthCheck resource to update. */ @com.google.api.client.util.Key private java.lang.String httpHealthCheck; /** Name of the HttpHealthCheck resource to update. */ public java.lang.String getHttpHealthCheck() { return httpHealthCheck; } /** Name of the HttpHealthCheck resource to update. */ public Update setHttpHealthCheck(java.lang.String httpHealthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTP_HEALTH_CHECK_PATTERN.matcher(httpHealthCheck).matches(), "Parameter httpHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.httpHealthCheck = httpHealthCheck; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the HttpsHealthChecks collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.HttpsHealthChecks.List request = compute.httpsHealthChecks().list(parameters ...)}
   * 
* * @return the resource collection */ public HttpsHealthChecks httpsHealthChecks() { return new HttpsHealthChecks(); } /** * The "httpsHealthChecks" collection of methods. */ public class HttpsHealthChecks { /** * Deletes the specified HttpsHealthCheck resource. * * Create a request for the method "httpsHealthChecks.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param httpsHealthCheck Name of the HttpsHealthCheck resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String httpsHealthCheck) throws java.io.IOException { Delete result = new Delete(project, httpsHealthCheck); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern HTTPS_HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified HttpsHealthCheck resource. * * Create a request for the method "httpsHealthChecks.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param httpsHealthCheck Name of the HttpsHealthCheck resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String httpsHealthCheck) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.httpsHealthCheck = com.google.api.client.util.Preconditions.checkNotNull(httpsHealthCheck, "Required parameter httpsHealthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTPS_HEALTH_CHECK_PATTERN.matcher(httpsHealthCheck).matches(), "Parameter httpsHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the HttpsHealthCheck resource to delete. */ @com.google.api.client.util.Key private java.lang.String httpsHealthCheck; /** Name of the HttpsHealthCheck resource to delete. */ public java.lang.String getHttpsHealthCheck() { return httpsHealthCheck; } /** Name of the HttpsHealthCheck resource to delete. */ public Delete setHttpsHealthCheck(java.lang.String httpsHealthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTPS_HEALTH_CHECK_PATTERN.matcher(httpsHealthCheck).matches(), "Parameter httpsHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.httpsHealthCheck = httpsHealthCheck; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified HttpsHealthCheck resource. * * Create a request for the method "httpsHealthChecks.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param httpsHealthCheck Name of the HttpsHealthCheck resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String httpsHealthCheck) throws java.io.IOException { Get result = new Get(project, httpsHealthCheck); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern HTTPS_HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified HttpsHealthCheck resource. * * Create a request for the method "httpsHealthChecks.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param httpsHealthCheck Name of the HttpsHealthCheck resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String httpsHealthCheck) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.HttpsHealthCheck.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.httpsHealthCheck = com.google.api.client.util.Preconditions.checkNotNull(httpsHealthCheck, "Required parameter httpsHealthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTPS_HEALTH_CHECK_PATTERN.matcher(httpsHealthCheck).matches(), "Parameter httpsHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the HttpsHealthCheck resource to return. */ @com.google.api.client.util.Key private java.lang.String httpsHealthCheck; /** Name of the HttpsHealthCheck resource to return. */ public java.lang.String getHttpsHealthCheck() { return httpsHealthCheck; } /** Name of the HttpsHealthCheck resource to return. */ public Get setHttpsHealthCheck(java.lang.String httpsHealthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTPS_HEALTH_CHECK_PATTERN.matcher(httpsHealthCheck).matches(), "Parameter httpsHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.httpsHealthCheck = httpsHealthCheck; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a HttpsHealthCheck resource in the specified project using the data included in the * request. * * Create a request for the method "httpsHealthChecks.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.HttpsHealthCheck} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.HttpsHealthCheck content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/httpsHealthChecks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a HttpsHealthCheck resource in the specified project using the data included in the * request. * * Create a request for the method "httpsHealthChecks.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.HttpsHealthCheck} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.HttpsHealthCheck content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of HttpsHealthCheck resources available to the specified project. * * Create a request for the method "httpsHealthChecks.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/httpsHealthChecks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of HttpsHealthCheck resources available to the specified project. * * Create a request for the method "httpsHealthChecks.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.HttpsHealthCheckList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates a HttpsHealthCheck resource in the specified project using the data included in the * request. This method supports PATCH semantics and uses the JSON merge patch format and processing * rules. * * Create a request for the method "httpsHealthChecks.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param httpsHealthCheck Name of the HttpsHealthCheck resource to patch. * @param content the {@link com.google.api.services.compute.model.HttpsHealthCheck} * @return the request */ public Patch patch(java.lang.String project, java.lang.String httpsHealthCheck, com.google.api.services.compute.model.HttpsHealthCheck content) throws java.io.IOException { Patch result = new Patch(project, httpsHealthCheck, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern HTTPS_HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates a HttpsHealthCheck resource in the specified project using the data included in the * request. This method supports PATCH semantics and uses the JSON merge patch format and * processing rules. * * Create a request for the method "httpsHealthChecks.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param httpsHealthCheck Name of the HttpsHealthCheck resource to patch. * @param content the {@link com.google.api.services.compute.model.HttpsHealthCheck} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String httpsHealthCheck, com.google.api.services.compute.model.HttpsHealthCheck content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.httpsHealthCheck = com.google.api.client.util.Preconditions.checkNotNull(httpsHealthCheck, "Required parameter httpsHealthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTPS_HEALTH_CHECK_PATTERN.matcher(httpsHealthCheck).matches(), "Parameter httpsHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the HttpsHealthCheck resource to patch. */ @com.google.api.client.util.Key private java.lang.String httpsHealthCheck; /** Name of the HttpsHealthCheck resource to patch. */ public java.lang.String getHttpsHealthCheck() { return httpsHealthCheck; } /** Name of the HttpsHealthCheck resource to patch. */ public Patch setHttpsHealthCheck(java.lang.String httpsHealthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTPS_HEALTH_CHECK_PATTERN.matcher(httpsHealthCheck).matches(), "Parameter httpsHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.httpsHealthCheck = httpsHealthCheck; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates a HttpsHealthCheck resource in the specified project using the data included in the * request. * * Create a request for the method "httpsHealthChecks.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param httpsHealthCheck Name of the HttpsHealthCheck resource to update. * @param content the {@link com.google.api.services.compute.model.HttpsHealthCheck} * @return the request */ public Update update(java.lang.String project, java.lang.String httpsHealthCheck, com.google.api.services.compute.model.HttpsHealthCheck content) throws java.io.IOException { Update result = new Update(project, httpsHealthCheck, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern HTTPS_HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates a HttpsHealthCheck resource in the specified project using the data included in the * request. * * Create a request for the method "httpsHealthChecks.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param httpsHealthCheck Name of the HttpsHealthCheck resource to update. * @param content the {@link com.google.api.services.compute.model.HttpsHealthCheck} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String httpsHealthCheck, com.google.api.services.compute.model.HttpsHealthCheck content) { super(Compute.this, "PUT", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.httpsHealthCheck = com.google.api.client.util.Preconditions.checkNotNull(httpsHealthCheck, "Required parameter httpsHealthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTPS_HEALTH_CHECK_PATTERN.matcher(httpsHealthCheck).matches(), "Parameter httpsHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the HttpsHealthCheck resource to update. */ @com.google.api.client.util.Key private java.lang.String httpsHealthCheck; /** Name of the HttpsHealthCheck resource to update. */ public java.lang.String getHttpsHealthCheck() { return httpsHealthCheck; } /** Name of the HttpsHealthCheck resource to update. */ public Update setHttpsHealthCheck(java.lang.String httpsHealthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HTTPS_HEALTH_CHECK_PATTERN.matcher(httpsHealthCheck).matches(), "Parameter httpsHealthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.httpsHealthCheck = httpsHealthCheck; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the ImageFamilyViews collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.ImageFamilyViews.List request = compute.imageFamilyViews().list(parameters ...)}
   * 
* * @return the resource collection */ public ImageFamilyViews imageFamilyViews() { return new ImageFamilyViews(); } /** * The "imageFamilyViews" collection of methods. */ public class ImageFamilyViews { /** * Returns the latest image that is part of an image family, is not deprecated and is rolled out in * the specified zone. * * Create a request for the method "imageFamilyViews.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param family Name of the image family to search for. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String family) throws java.io.IOException { Get result = new Get(project, zone, family); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/imageFamilyViews/{family}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FAMILY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the latest image that is part of an image family, is not deprecated and is rolled out * in the specified zone. * * Create a request for the method "imageFamilyViews.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param family Name of the image family to search for. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String family) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ImageFamilyView.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.family = com.google.api.client.util.Preconditions.checkNotNull(family, "Required parameter family must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FAMILY_PATTERN.matcher(family).matches(), "Parameter family must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the image family to search for. */ @com.google.api.client.util.Key private java.lang.String family; /** Name of the image family to search for. */ public java.lang.String getFamily() { return family; } /** Name of the image family to search for. */ public Get setFamily(java.lang.String family) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FAMILY_PATTERN.matcher(family).matches(), "Parameter family must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.family = family; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Images collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Images.List request = compute.images().list(parameters ...)}
   * 
* * @return the resource collection */ public Images images() { return new Images(); } /** * The "images" collection of methods. */ public class Images { /** * Deletes the specified image. * * Create a request for the method "images.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param image Name of the image resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String image) throws java.io.IOException { Delete result = new Delete(project, image); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/images/{image}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern IMAGE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified image. * * Create a request for the method "images.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param image Name of the image resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String image) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.image = com.google.api.client.util.Preconditions.checkNotNull(image, "Required parameter image must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(IMAGE_PATTERN.matcher(image).matches(), "Parameter image must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the image resource to delete. */ @com.google.api.client.util.Key private java.lang.String image; /** Name of the image resource to delete. */ public java.lang.String getImage() { return image; } /** Name of the image resource to delete. */ public Delete setImage(java.lang.String image) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(IMAGE_PATTERN.matcher(image).matches(), "Parameter image must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.image = image; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Sets the deprecation status of an image. If an empty request body is given, clears the * deprecation status instead. * * Create a request for the method "images.deprecate". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Deprecate#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param image Image name. * @param content the {@link com.google.api.services.compute.model.DeprecationStatus} * @return the request */ public Deprecate deprecate(java.lang.String project, java.lang.String image, com.google.api.services.compute.model.DeprecationStatus content) throws java.io.IOException { Deprecate result = new Deprecate(project, image, content); initialize(result); return result; } public class Deprecate extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/images/{image}/deprecate"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern IMAGE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the deprecation status of an image. If an empty request body is given, clears the * deprecation status instead. * * Create a request for the method "images.deprecate". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Deprecate#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param image Image name. * @param content the {@link com.google.api.services.compute.model.DeprecationStatus} * @since 1.13 */ protected Deprecate(java.lang.String project, java.lang.String image, com.google.api.services.compute.model.DeprecationStatus content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.image = com.google.api.client.util.Preconditions.checkNotNull(image, "Required parameter image must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(IMAGE_PATTERN.matcher(image).matches(), "Parameter image must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Deprecate set$Xgafv(java.lang.String $Xgafv) { return (Deprecate) super.set$Xgafv($Xgafv); } @Override public Deprecate setAccessToken(java.lang.String accessToken) { return (Deprecate) super.setAccessToken(accessToken); } @Override public Deprecate setAlt(java.lang.String alt) { return (Deprecate) super.setAlt(alt); } @Override public Deprecate setCallback(java.lang.String callback) { return (Deprecate) super.setCallback(callback); } @Override public Deprecate setFields(java.lang.String fields) { return (Deprecate) super.setFields(fields); } @Override public Deprecate setKey(java.lang.String key) { return (Deprecate) super.setKey(key); } @Override public Deprecate setOauthToken(java.lang.String oauthToken) { return (Deprecate) super.setOauthToken(oauthToken); } @Override public Deprecate setPrettyPrint(java.lang.Boolean prettyPrint) { return (Deprecate) super.setPrettyPrint(prettyPrint); } @Override public Deprecate setQuotaUser(java.lang.String quotaUser) { return (Deprecate) super.setQuotaUser(quotaUser); } @Override public Deprecate setUploadType(java.lang.String uploadType) { return (Deprecate) super.setUploadType(uploadType); } @Override public Deprecate setUploadProtocol(java.lang.String uploadProtocol) { return (Deprecate) super.setUploadProtocol(uploadProtocol); } @Override public Deprecate setUserIp(java.lang.String userIp) { return (Deprecate) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Deprecate setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Image name. */ @com.google.api.client.util.Key private java.lang.String image; /** Image name. */ public java.lang.String getImage() { return image; } /** Image name. */ public Deprecate setImage(java.lang.String image) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(IMAGE_PATTERN.matcher(image).matches(), "Parameter image must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.image = image; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Deprecate setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Deprecate set(String parameterName, Object value) { return (Deprecate) super.set(parameterName, value); } } /** * Returns the specified image. * * Create a request for the method "images.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param image Name of the image resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String image) throws java.io.IOException { Get result = new Get(project, image); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/images/{image}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern IMAGE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified image. * * Create a request for the method "images.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param image Name of the image resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String image) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Image.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.image = com.google.api.client.util.Preconditions.checkNotNull(image, "Required parameter image must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(IMAGE_PATTERN.matcher(image).matches(), "Parameter image must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the image resource to return. */ @com.google.api.client.util.Key private java.lang.String image; /** Name of the image resource to return. */ public java.lang.String getImage() { return image; } /** Name of the image resource to return. */ public Get setImage(java.lang.String image) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(IMAGE_PATTERN.matcher(image).matches(), "Parameter image must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.image = image; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Returns the latest image that is part of an image family and is not deprecated. For more * information on image families, see Public image families documentation. * * Create a request for the method "images.getFromFamily". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetFromFamily#execute()} method to invoke the remote operation. * * @param project The image project that the image belongs to. For example, to get a CentOS image, specify centos- * cloud as the image project. * @param family Name of the image family to search for. * @return the request */ public GetFromFamily getFromFamily(java.lang.String project, java.lang.String family) throws java.io.IOException { GetFromFamily result = new GetFromFamily(project, family); initialize(result); return result; } public class GetFromFamily extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/images/family/{family}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FAMILY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the latest image that is part of an image family and is not deprecated. For more * information on image families, see Public image families documentation. * * Create a request for the method "images.getFromFamily". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetFromFamily#execute()} method to invoke the remote operation.

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

* * @param project The image project that the image belongs to. For example, to get a CentOS image, specify centos- * cloud as the image project. * @param family Name of the image family to search for. * @since 1.13 */ protected GetFromFamily(java.lang.String project, java.lang.String family) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Image.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.family = com.google.api.client.util.Preconditions.checkNotNull(family, "Required parameter family must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FAMILY_PATTERN.matcher(family).matches(), "Parameter family must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetFromFamily set$Xgafv(java.lang.String $Xgafv) { return (GetFromFamily) super.set$Xgafv($Xgafv); } @Override public GetFromFamily setAccessToken(java.lang.String accessToken) { return (GetFromFamily) super.setAccessToken(accessToken); } @Override public GetFromFamily setAlt(java.lang.String alt) { return (GetFromFamily) super.setAlt(alt); } @Override public GetFromFamily setCallback(java.lang.String callback) { return (GetFromFamily) super.setCallback(callback); } @Override public GetFromFamily setFields(java.lang.String fields) { return (GetFromFamily) super.setFields(fields); } @Override public GetFromFamily setKey(java.lang.String key) { return (GetFromFamily) super.setKey(key); } @Override public GetFromFamily setOauthToken(java.lang.String oauthToken) { return (GetFromFamily) super.setOauthToken(oauthToken); } @Override public GetFromFamily setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetFromFamily) super.setPrettyPrint(prettyPrint); } @Override public GetFromFamily setQuotaUser(java.lang.String quotaUser) { return (GetFromFamily) super.setQuotaUser(quotaUser); } @Override public GetFromFamily setUploadType(java.lang.String uploadType) { return (GetFromFamily) super.setUploadType(uploadType); } @Override public GetFromFamily setUploadProtocol(java.lang.String uploadProtocol) { return (GetFromFamily) super.setUploadProtocol(uploadProtocol); } @Override public GetFromFamily setUserIp(java.lang.String userIp) { return (GetFromFamily) super.setUserIp(userIp); } /** * The image project that the image belongs to. For example, to get a CentOS image, specify * centos-cloud as the image project. */ @com.google.api.client.util.Key private java.lang.String project; /** The image project that the image belongs to. For example, to get a CentOS image, specify centos- cloud as the image project. */ public java.lang.String getProject() { return project; } /** * The image project that the image belongs to. For example, to get a CentOS image, specify * centos-cloud as the image project. */ public GetFromFamily setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the image family to search for. */ @com.google.api.client.util.Key private java.lang.String family; /** Name of the image family to search for. */ public java.lang.String getFamily() { return family; } /** Name of the image family to search for. */ public GetFromFamily setFamily(java.lang.String family) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FAMILY_PATTERN.matcher(family).matches(), "Parameter family must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.family = family; return this; } @Override public GetFromFamily set(String parameterName, Object value) { return (GetFromFamily) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "images.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/images/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "images.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates an image in the specified project using the data included in the request. * * Create a request for the method "images.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Image} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.Image content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/images"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates an image in the specified project using the data included in the request. * * Create a request for the method "images.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Image} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.Image content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Force image creation if true. */ @com.google.api.client.util.Key private java.lang.Boolean forceCreate; /** Force image creation if true. */ public java.lang.Boolean getForceCreate() { return forceCreate; } /** Force image creation if true. */ public Insert setForceCreate(java.lang.Boolean forceCreate) { this.forceCreate = forceCreate; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of custom images available to the specified project. Custom images are images * you create that belong to your project. This method does not get any images that belong to other * projects, including publicly-available images, like Debian 8. If you want to get a list of * publicly-available images, use this method to make a request to the respective image project, * such as debian-cloud or windows-cloud. * * Create a request for the method "images.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/images"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of custom images available to the specified project. Custom images are * images you create that belong to your project. This method does not get any images that belong * to other projects, including publicly-available images, like Debian 8. If you want to get a * list of publicly-available images, use this method to make a request to the respective image * project, such as debian-cloud or windows-cloud. * * Create a request for the method "images.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ImageList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified image with the data included in the request. Only the following fields can * be modified: family, description, deprecation status. * * Create a request for the method "images.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param image Name of the image resource to patch. * @param content the {@link com.google.api.services.compute.model.Image} * @return the request */ public Patch patch(java.lang.String project, java.lang.String image, com.google.api.services.compute.model.Image content) throws java.io.IOException { Patch result = new Patch(project, image, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/images/{image}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern IMAGE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified image with the data included in the request. Only the following fields * can be modified: family, description, deprecation status. * * Create a request for the method "images.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param image Name of the image resource to patch. * @param content the {@link com.google.api.services.compute.model.Image} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String image, com.google.api.services.compute.model.Image content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.image = com.google.api.client.util.Preconditions.checkNotNull(image, "Required parameter image must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(IMAGE_PATTERN.matcher(image).matches(), "Parameter image must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the image resource to patch. */ @com.google.api.client.util.Key private java.lang.String image; /** Name of the image resource to patch. */ public java.lang.String getImage() { return image; } /** Name of the image resource to patch. */ public Patch setImage(java.lang.String image) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(IMAGE_PATTERN.matcher(image).matches(), "Parameter image must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.image = image; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "images.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/images/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "images.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Sets the labels on an image. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "images.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/images/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on an image. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "images.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "images.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/images/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "images.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the InstanceGroupManagerResizeRequests collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.InstanceGroupManagerResizeRequests.List request = compute.instanceGroupManagerResizeRequests().list(parameters ...)}
   * 
* * @return the resource collection */ public InstanceGroupManagerResizeRequests instanceGroupManagerResizeRequests() { return new InstanceGroupManagerResizeRequests(); } /** * The "instanceGroupManagerResizeRequests" collection of methods. */ public class InstanceGroupManagerResizeRequests { /** * Cancels the specified resize request and removes it from the queue. Cancelled resize request does * no longer wait for the resources to be provisioned. Cancel is only possible for requests that are * accepted in the queue. * * Create a request for the method "instanceGroupManagerResizeRequests.cancel". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Cancel#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. The name should conform to * RFC1035. * @param instanceGroupManager The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. * @param resizeRequest The name of the resize request to cancel. The name should conform to RFC1035 or be a resource ID. * @return the request */ public Cancel cancel(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, java.lang.String resizeRequest) throws java.io.IOException { Cancel result = new Cancel(project, zone, instanceGroupManager, resizeRequest); initialize(result); return result; } public class Cancel extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Cancels the specified resize request and removes it from the queue. Cancelled resize request * does no longer wait for the resources to be provisioned. Cancel is only possible for requests * that are accepted in the queue. * * Create a request for the method "instanceGroupManagerResizeRequests.cancel". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. The name should conform to * RFC1035. * @param instanceGroupManager The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. * @param resizeRequest The name of the resize request to cancel. The name should conform to RFC1035 or be a resource ID. * @since 1.13 */ protected Cancel(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, java.lang.String resizeRequest) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); this.resizeRequest = com.google.api.client.util.Preconditions.checkNotNull(resizeRequest, "Required parameter resizeRequest must be specified."); } @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); } @Override public Cancel setUserIp(java.lang.String userIp) { return (Cancel) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Cancel setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the managed instance group is located. The name should conform * to RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. The name should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the managed instance group is located. The name should conform * to RFC1035. */ public Cancel setZone(java.lang.String zone) { this.zone = zone; return this; } /** * The name of the managed instance group. The name should conform to RFC1035 or be a resource * ID. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** * The name of the managed instance group. The name should conform to RFC1035 or be a resource * ID. */ public Cancel setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * The name of the resize request to cancel. The name should conform to RFC1035 or be a * resource ID. */ @com.google.api.client.util.Key private java.lang.String resizeRequest; /** The name of the resize request to cancel. The name should conform to RFC1035 or be a resource ID. */ public java.lang.String getResizeRequest() { return resizeRequest; } /** * The name of the resize request to cancel. The name should conform to RFC1035 or be a * resource ID. */ public Cancel setResizeRequest(java.lang.String resizeRequest) { this.resizeRequest = resizeRequest; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Cancel setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Cancel set(String parameterName, Object value) { return (Cancel) super.set(parameterName, value); } } /** * Deletes the specified, inactive resize request. Requests that are still active cannot be deleted. * Deleting request does not delete instances that were provisioned previously. * * Create a request for the method "instanceGroupManagerResizeRequests.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. The name should conform to * RFC1035. * @param instanceGroupManager The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. * @param resizeRequest The name of the resize request to delete. The name should conform to RFC1035 or be a resource ID. * @return the request */ public Delete delete(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, java.lang.String resizeRequest) throws java.io.IOException { Delete result = new Delete(project, zone, instanceGroupManager, resizeRequest); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Deletes the specified, inactive resize request. Requests that are still active cannot be * deleted. Deleting request does not delete instances that were provisioned previously. * * Create a request for the method "instanceGroupManagerResizeRequests.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. The name should conform to * RFC1035. * @param instanceGroupManager The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. * @param resizeRequest The name of the resize request to delete. The name should conform to RFC1035 or be a resource ID. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, java.lang.String resizeRequest) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); this.resizeRequest = com.google.api.client.util.Preconditions.checkNotNull(resizeRequest, "Required parameter resizeRequest must be specified."); } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the managed instance group is located. The name should conform * to RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. The name should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the managed instance group is located. The name should conform * to RFC1035. */ public Delete setZone(java.lang.String zone) { this.zone = zone; return this; } /** * The name of the managed instance group. The name should conform to RFC1035 or be a resource * ID. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** * The name of the managed instance group. The name should conform to RFC1035 or be a resource * ID. */ public Delete setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * The name of the resize request to delete. The name should conform to RFC1035 or be a * resource ID. */ @com.google.api.client.util.Key private java.lang.String resizeRequest; /** The name of the resize request to delete. The name should conform to RFC1035 or be a resource ID. */ public java.lang.String getResizeRequest() { return resizeRequest; } /** * The name of the resize request to delete. The name should conform to RFC1035 or be a * resource ID. */ public Delete setResizeRequest(java.lang.String resizeRequest) { this.resizeRequest = resizeRequest; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns all of the details about the specified resize request. * * Create a request for the method "instanceGroupManagerResizeRequests.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the href="/compute/docs/regions-zones/#available">zone scoping this request. Name should * conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. Name should conform to RFC1035 or be a resource ID. * @param resizeRequest The name of the resize request. Name should conform to RFC1035 or be a resource ID. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, java.lang.String resizeRequest) throws java.io.IOException { Get result = new Get(project, zone, instanceGroupManager, resizeRequest); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Returns all of the details about the specified resize request. * * Create a request for the method "instanceGroupManagerResizeRequests.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the href="/compute/docs/regions-zones/#available">zone scoping this request. Name should * conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. Name should conform to RFC1035 or be a resource ID. * @param resizeRequest The name of the resize request. Name should conform to RFC1035 or be a resource ID. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, java.lang.String resizeRequest) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceGroupManagerResizeRequest.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); this.resizeRequest = com.google.api.client.util.Preconditions.checkNotNull(resizeRequest, "Required parameter resizeRequest must be specified."); } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the href="/compute/docs/regions-zones/#available">zone scoping this request. Name * should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the href="/compute/docs/regions-zones/#available">zone scoping this request. Name should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** * Name of the href="/compute/docs/regions-zones/#available">zone scoping this request. Name * should conform to RFC1035. */ public Get setZone(java.lang.String zone) { this.zone = zone; return this; } /** * The name of the managed instance group. Name should conform to RFC1035 or be a resource ID. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. Name should conform to RFC1035 or be a resource ID. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** * The name of the managed instance group. Name should conform to RFC1035 or be a resource ID. */ public Get setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** The name of the resize request. Name should conform to RFC1035 or be a resource ID. */ @com.google.api.client.util.Key private java.lang.String resizeRequest; /** The name of the resize request. Name should conform to RFC1035 or be a resource ID. */ public java.lang.String getResizeRequest() { return resizeRequest; } /** The name of the resize request. Name should conform to RFC1035 or be a resource ID. */ public Get setResizeRequest(java.lang.String resizeRequest) { this.resizeRequest = resizeRequest; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a new resize request that starts provisioning VMs immediately or queues VM creation. * * Create a request for the method "instanceGroupManagerResizeRequests.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located and where the resize request will * be created. Name should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group to which the resize request will be added. Name should * conform to RFC1035 or be a resource ID. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagerResizeRequest} * @return the request */ public Insert insert(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagerResizeRequest content) throws java.io.IOException { Insert result = new Insert(project, zone, instanceGroupManager, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a new resize request that starts provisioning VMs immediately or queues VM creation. * * Create a request for the method "instanceGroupManagerResizeRequests.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located and where the resize request will * be created. Name should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group to which the resize request will be added. Name should * conform to RFC1035 or be a resource ID. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagerResizeRequest} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagerResizeRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the managed instance group is located and where the resize * request will be created. Name should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located and where the resize request will be created. Name should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the managed instance group is located and where the resize * request will be created. Name should conform to RFC1035. */ public Insert setZone(java.lang.String zone) { this.zone = zone; return this; } /** * The name of the managed instance group to which the resize request will be added. Name * should conform to RFC1035 or be a resource ID. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group to which the resize request will be added. Name should conform to RFC1035 or be a resource ID. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** * The name of the managed instance group to which the resize request will be added. Name * should conform to RFC1035 or be a resource ID. */ public Insert setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of resize requests that are contained in the managed instance group. * * Create a request for the method "instanceGroupManagerResizeRequests.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. The name should conform to * RFC1035. * @param instanceGroupManager The name of the managed instance group. The name should conform to RFC1035. * @return the request */ public List list(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager) throws java.io.IOException { List result = new List(project, zone, instanceGroupManager); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves a list of resize requests that are contained in the managed instance group. * * Create a request for the method "instanceGroupManagerResizeRequests.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. The name should conform to * RFC1035. * @param instanceGroupManager The name of the managed instance group. The name should conform to RFC1035. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceGroupManagerResizeRequestsListResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the managed instance group is located. The name should conform * to RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. The name should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the managed instance group is located. The name should conform * to RFC1035. */ public List setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group. The name should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. The name should conform to RFC1035. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. The name should conform to RFC1035. */ public List setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the InstanceGroupManagers collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.InstanceGroupManagers.List request = compute.instanceGroupManagers().list(parameters ...)}
   * 
* * @return the resource collection */ public InstanceGroupManagers instanceGroupManagers() { return new InstanceGroupManagers(); } /** * The "instanceGroupManagers" collection of methods. */ public class InstanceGroupManagers { /** * Flags the specified instances to be removed from the managed instance group. Abandoning an * instance does not delete the instance, but it does remove the instance from any target pools that * are applied by the managed instance group. This method reduces the targetSize of the managed * instance group by the number of instances that you abandon. This operation is marked as DONE when * the action is scheduled even if the instances have not yet been removed from the group. You must * separately verify the status of the abandoning action with the listmanagedinstances method. If * the group is part of a backend service that has enabled connection draining, it can take up to 60 * seconds after the connection draining duration has elapsed before the VM instance is removed or * deleted. You can specify a maximum of 1000 instances with this method per request. * * Create a request for the method "instanceGroupManagers.abandonInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AbandonInstances#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersAbandonInstancesRequest} * @return the request */ public AbandonInstances abandonInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersAbandonInstancesRequest content) throws java.io.IOException { AbandonInstances result = new AbandonInstances(project, zone, instanceGroupManager, content); initialize(result); return result; } public class AbandonInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Flags the specified instances to be removed from the managed instance group. Abandoning an * instance does not delete the instance, but it does remove the instance from any target pools * that are applied by the managed instance group. This method reduces the targetSize of the * managed instance group by the number of instances that you abandon. This operation is marked as * DONE when the action is scheduled even if the instances have not yet been removed from the * group. You must separately verify the status of the abandoning action with the * listmanagedinstances method. If the group is part of a backend service that has enabled * connection draining, it can take up to 60 seconds after the connection draining duration has * elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 * instances with this method per request. * * Create a request for the method "instanceGroupManagers.abandonInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AbandonInstances#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersAbandonInstancesRequest} * @since 1.13 */ protected AbandonInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersAbandonInstancesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public AbandonInstances set$Xgafv(java.lang.String $Xgafv) { return (AbandonInstances) super.set$Xgafv($Xgafv); } @Override public AbandonInstances setAccessToken(java.lang.String accessToken) { return (AbandonInstances) super.setAccessToken(accessToken); } @Override public AbandonInstances setAlt(java.lang.String alt) { return (AbandonInstances) super.setAlt(alt); } @Override public AbandonInstances setCallback(java.lang.String callback) { return (AbandonInstances) super.setCallback(callback); } @Override public AbandonInstances setFields(java.lang.String fields) { return (AbandonInstances) super.setFields(fields); } @Override public AbandonInstances setKey(java.lang.String key) { return (AbandonInstances) super.setKey(key); } @Override public AbandonInstances setOauthToken(java.lang.String oauthToken) { return (AbandonInstances) super.setOauthToken(oauthToken); } @Override public AbandonInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (AbandonInstances) super.setPrettyPrint(prettyPrint); } @Override public AbandonInstances setQuotaUser(java.lang.String quotaUser) { return (AbandonInstances) super.setQuotaUser(quotaUser); } @Override public AbandonInstances setUploadType(java.lang.String uploadType) { return (AbandonInstances) super.setUploadType(uploadType); } @Override public AbandonInstances setUploadProtocol(java.lang.String uploadProtocol) { return (AbandonInstances) super.setUploadProtocol(uploadProtocol); } @Override public AbandonInstances setUserIp(java.lang.String userIp) { return (AbandonInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AbandonInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the managed instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the managed instance group is located. */ public AbandonInstances setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. */ public AbandonInstances setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AbandonInstances setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AbandonInstances set(String parameterName, Object value) { return (AbandonInstances) super.set(parameterName, value); } } /** * Retrieves the list of managed instance groups and groups them by zone. To prevent failure, Google * recommends that you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "instanceGroupManagers.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/instanceGroupManagers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of managed instance groups and groups them by zone. To prevent failure, * Google recommends that you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "instanceGroupManagers.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceGroupManagerAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Applies changes to selected instances on the managed instance group. This method can be used to * apply new overrides and/or new versions. * * Create a request for the method "instanceGroupManagers.applyUpdatesToInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ApplyUpdatesToInstances#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. Should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group, should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersApplyUpdatesRequest} * @return the request */ public ApplyUpdatesToInstances applyUpdatesToInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersApplyUpdatesRequest content) throws java.io.IOException { ApplyUpdatesToInstances result = new ApplyUpdatesToInstances(project, zone, instanceGroupManager, content); initialize(result); return result; } public class ApplyUpdatesToInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Applies changes to selected instances on the managed instance group. This method can be used to * apply new overrides and/or new versions. * * Create a request for the method "instanceGroupManagers.applyUpdatesToInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ApplyUpdatesToInstances#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. Should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group, should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersApplyUpdatesRequest} * @since 1.13 */ protected ApplyUpdatesToInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersApplyUpdatesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public ApplyUpdatesToInstances set$Xgafv(java.lang.String $Xgafv) { return (ApplyUpdatesToInstances) super.set$Xgafv($Xgafv); } @Override public ApplyUpdatesToInstances setAccessToken(java.lang.String accessToken) { return (ApplyUpdatesToInstances) super.setAccessToken(accessToken); } @Override public ApplyUpdatesToInstances setAlt(java.lang.String alt) { return (ApplyUpdatesToInstances) super.setAlt(alt); } @Override public ApplyUpdatesToInstances setCallback(java.lang.String callback) { return (ApplyUpdatesToInstances) super.setCallback(callback); } @Override public ApplyUpdatesToInstances setFields(java.lang.String fields) { return (ApplyUpdatesToInstances) super.setFields(fields); } @Override public ApplyUpdatesToInstances setKey(java.lang.String key) { return (ApplyUpdatesToInstances) super.setKey(key); } @Override public ApplyUpdatesToInstances setOauthToken(java.lang.String oauthToken) { return (ApplyUpdatesToInstances) super.setOauthToken(oauthToken); } @Override public ApplyUpdatesToInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (ApplyUpdatesToInstances) super.setPrettyPrint(prettyPrint); } @Override public ApplyUpdatesToInstances setQuotaUser(java.lang.String quotaUser) { return (ApplyUpdatesToInstances) super.setQuotaUser(quotaUser); } @Override public ApplyUpdatesToInstances setUploadType(java.lang.String uploadType) { return (ApplyUpdatesToInstances) super.setUploadType(uploadType); } @Override public ApplyUpdatesToInstances setUploadProtocol(java.lang.String uploadProtocol) { return (ApplyUpdatesToInstances) super.setUploadProtocol(uploadProtocol); } @Override public ApplyUpdatesToInstances setUserIp(java.lang.String userIp) { return (ApplyUpdatesToInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ApplyUpdatesToInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the managed instance group is located. Should conform to * RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. Should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the managed instance group is located. Should conform to * RFC1035. */ public ApplyUpdatesToInstances setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group, should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group, should conform to RFC1035. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group, should conform to RFC1035. */ public ApplyUpdatesToInstances setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } @Override public ApplyUpdatesToInstances set(String parameterName, Object value) { return (ApplyUpdatesToInstances) super.set(parameterName, value); } } /** * Creates instances with per-instance configurations in this managed instance group. Instances are * created using the current instance template. The create instances operation is marked DONE if the * createInstances request is successful. The underlying actions take additional time. You must * separately verify the status of the creating or actions with the listmanagedinstances method. * * Create a request for the method "instanceGroupManagers.createInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link CreateInstances#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. It should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersCreateInstancesRequest} * @return the request */ public CreateInstances createInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersCreateInstancesRequest content) throws java.io.IOException { CreateInstances result = new CreateInstances(project, zone, instanceGroupManager, content); initialize(result); return result; } public class CreateInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates instances with per-instance configurations in this managed instance group. Instances * are created using the current instance template. The create instances operation is marked DONE * if the createInstances request is successful. The underlying actions take additional time. You * must separately verify the status of the creating or actions with the listmanagedinstances * method. * * Create a request for the method "instanceGroupManagers.createInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link CreateInstances#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. It should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersCreateInstancesRequest} * @since 1.13 */ protected CreateInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersCreateInstancesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public CreateInstances set$Xgafv(java.lang.String $Xgafv) { return (CreateInstances) super.set$Xgafv($Xgafv); } @Override public CreateInstances setAccessToken(java.lang.String accessToken) { return (CreateInstances) super.setAccessToken(accessToken); } @Override public CreateInstances setAlt(java.lang.String alt) { return (CreateInstances) super.setAlt(alt); } @Override public CreateInstances setCallback(java.lang.String callback) { return (CreateInstances) super.setCallback(callback); } @Override public CreateInstances setFields(java.lang.String fields) { return (CreateInstances) super.setFields(fields); } @Override public CreateInstances setKey(java.lang.String key) { return (CreateInstances) super.setKey(key); } @Override public CreateInstances setOauthToken(java.lang.String oauthToken) { return (CreateInstances) super.setOauthToken(oauthToken); } @Override public CreateInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (CreateInstances) super.setPrettyPrint(prettyPrint); } @Override public CreateInstances setQuotaUser(java.lang.String quotaUser) { return (CreateInstances) super.setQuotaUser(quotaUser); } @Override public CreateInstances setUploadType(java.lang.String uploadType) { return (CreateInstances) super.setUploadType(uploadType); } @Override public CreateInstances setUploadProtocol(java.lang.String uploadProtocol) { return (CreateInstances) super.setUploadProtocol(uploadProtocol); } @Override public CreateInstances setUserIp(java.lang.String userIp) { return (CreateInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public CreateInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the managed instance group is located. It should conform to * RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. It should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the managed instance group is located. It should conform to * RFC1035. */ public CreateInstances setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group. It should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. It should conform to RFC1035. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. It should conform to RFC1035. */ public CreateInstances setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. The request ID must be a valid UUID with the exception that zero UUID * is not supported ( 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. The request ID must be a valid UUID with the exception that zero UUID * is not supported ( 00000000-0000-0000-0000-000000000000). */ public CreateInstances setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public CreateInstances set(String parameterName, Object value) { return (CreateInstances) super.set(parameterName, value); } } /** * Deletes the specified managed instance group and all of the instances in that group. Note that * the instance group must not belong to a backend service. Read Deleting an instance group for more * information. * * Create a request for the method "instanceGroupManagers.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager) throws java.io.IOException { Delete result = new Delete(project, zone, instanceGroupManager); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Deletes the specified managed instance group and all of the instances in that group. Note that * the instance group must not belong to a backend service. Read Deleting an instance group for * more information. * * Create a request for the method "instanceGroupManagers.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the managed instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the managed instance group is located. */ public Delete setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group to delete. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group to delete. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group to delete. */ public Delete setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Flags the specified instances in the managed instance group for immediate deletion. The instances * are also removed from any target pools of which they were a member. This method reduces the * targetSize of the managed instance group by the number of instances that you delete. This * operation is marked as DONE when the action is scheduled even if the instances are still being * deleted. You must separately verify the status of the deleting action with the * listmanagedinstances method. If the group is part of a backend service that has enabled * connection draining, it can take up to 60 seconds after the connection draining duration has * elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances * with this method per request. * * Create a request for the method "instanceGroupManagers.deleteInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link DeleteInstances#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersDeleteInstancesRequest} * @return the request */ public DeleteInstances deleteInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersDeleteInstancesRequest content) throws java.io.IOException { DeleteInstances result = new DeleteInstances(project, zone, instanceGroupManager, content); initialize(result); return result; } public class DeleteInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Flags the specified instances in the managed instance group for immediate deletion. The * instances are also removed from any target pools of which they were a member. This method * reduces the targetSize of the managed instance group by the number of instances that you * delete. This operation is marked as DONE when the action is scheduled even if the instances are * still being deleted. You must separately verify the status of the deleting action with the * listmanagedinstances method. If the group is part of a backend service that has enabled * connection draining, it can take up to 60 seconds after the connection draining duration has * elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 * instances with this method per request. * * Create a request for the method "instanceGroupManagers.deleteInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link DeleteInstances#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersDeleteInstancesRequest} * @since 1.13 */ protected DeleteInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersDeleteInstancesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public DeleteInstances set$Xgafv(java.lang.String $Xgafv) { return (DeleteInstances) super.set$Xgafv($Xgafv); } @Override public DeleteInstances setAccessToken(java.lang.String accessToken) { return (DeleteInstances) super.setAccessToken(accessToken); } @Override public DeleteInstances setAlt(java.lang.String alt) { return (DeleteInstances) super.setAlt(alt); } @Override public DeleteInstances setCallback(java.lang.String callback) { return (DeleteInstances) super.setCallback(callback); } @Override public DeleteInstances setFields(java.lang.String fields) { return (DeleteInstances) super.setFields(fields); } @Override public DeleteInstances setKey(java.lang.String key) { return (DeleteInstances) super.setKey(key); } @Override public DeleteInstances setOauthToken(java.lang.String oauthToken) { return (DeleteInstances) super.setOauthToken(oauthToken); } @Override public DeleteInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (DeleteInstances) super.setPrettyPrint(prettyPrint); } @Override public DeleteInstances setQuotaUser(java.lang.String quotaUser) { return (DeleteInstances) super.setQuotaUser(quotaUser); } @Override public DeleteInstances setUploadType(java.lang.String uploadType) { return (DeleteInstances) super.setUploadType(uploadType); } @Override public DeleteInstances setUploadProtocol(java.lang.String uploadProtocol) { return (DeleteInstances) super.setUploadProtocol(uploadProtocol); } @Override public DeleteInstances setUserIp(java.lang.String userIp) { return (DeleteInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public DeleteInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the managed instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the managed instance group is located. */ public DeleteInstances setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. */ public DeleteInstances setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public DeleteInstances setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public DeleteInstances set(String parameterName, Object value) { return (DeleteInstances) super.set(parameterName, value); } } /** * Deletes selected per-instance configurations for the managed instance group. * * Create a request for the method "instanceGroupManagers.deletePerInstanceConfigs". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link DeletePerInstanceConfigs#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. It should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersDeletePerInstanceConfigsReq} * @return the request */ public DeletePerInstanceConfigs deletePerInstanceConfigs(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersDeletePerInstanceConfigsReq content) throws java.io.IOException { DeletePerInstanceConfigs result = new DeletePerInstanceConfigs(project, zone, instanceGroupManager, content); initialize(result); return result; } public class DeletePerInstanceConfigs extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Deletes selected per-instance configurations for the managed instance group. * * Create a request for the method "instanceGroupManagers.deletePerInstanceConfigs". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link DeletePerInstanceConfigs#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. It should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersDeletePerInstanceConfigsReq} * @since 1.13 */ protected DeletePerInstanceConfigs(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersDeletePerInstanceConfigsReq content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public DeletePerInstanceConfigs set$Xgafv(java.lang.String $Xgafv) { return (DeletePerInstanceConfigs) super.set$Xgafv($Xgafv); } @Override public DeletePerInstanceConfigs setAccessToken(java.lang.String accessToken) { return (DeletePerInstanceConfigs) super.setAccessToken(accessToken); } @Override public DeletePerInstanceConfigs setAlt(java.lang.String alt) { return (DeletePerInstanceConfigs) super.setAlt(alt); } @Override public DeletePerInstanceConfigs setCallback(java.lang.String callback) { return (DeletePerInstanceConfigs) super.setCallback(callback); } @Override public DeletePerInstanceConfigs setFields(java.lang.String fields) { return (DeletePerInstanceConfigs) super.setFields(fields); } @Override public DeletePerInstanceConfigs setKey(java.lang.String key) { return (DeletePerInstanceConfigs) super.setKey(key); } @Override public DeletePerInstanceConfigs setOauthToken(java.lang.String oauthToken) { return (DeletePerInstanceConfigs) super.setOauthToken(oauthToken); } @Override public DeletePerInstanceConfigs setPrettyPrint(java.lang.Boolean prettyPrint) { return (DeletePerInstanceConfigs) super.setPrettyPrint(prettyPrint); } @Override public DeletePerInstanceConfigs setQuotaUser(java.lang.String quotaUser) { return (DeletePerInstanceConfigs) super.setQuotaUser(quotaUser); } @Override public DeletePerInstanceConfigs setUploadType(java.lang.String uploadType) { return (DeletePerInstanceConfigs) super.setUploadType(uploadType); } @Override public DeletePerInstanceConfigs setUploadProtocol(java.lang.String uploadProtocol) { return (DeletePerInstanceConfigs) super.setUploadProtocol(uploadProtocol); } @Override public DeletePerInstanceConfigs setUserIp(java.lang.String userIp) { return (DeletePerInstanceConfigs) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public DeletePerInstanceConfigs setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the managed instance group is located. It should conform to * RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. It should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the managed instance group is located. It should conform to * RFC1035. */ public DeletePerInstanceConfigs setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group. It should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. It should conform to RFC1035. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. It should conform to RFC1035. */ public DeletePerInstanceConfigs setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } @Override public DeletePerInstanceConfigs set(String parameterName, Object value) { return (DeletePerInstanceConfigs) super.set(parameterName, value); } } /** * Returns all of the details about the specified managed instance group. * * Create a request for the method "instanceGroupManagers.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager) throws java.io.IOException { Get result = new Get(project, zone, instanceGroupManager); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Returns all of the details about the specified managed instance group. * * Create a request for the method "instanceGroupManagers.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceGroupManager.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the managed instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the managed instance group is located. */ public Get setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. */ public Get setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a managed instance group using the information that you specify in the request. After the * group is created, instances in the group are created using the specified instance template. This * operation is marked as DONE when the group is created even if the instances in the group have not * yet been created. You must separately verify the status of the individual instances with the * listmanagedinstances method. A managed instance group can have up to 1000 VM instances per group. * Please contact Cloud Support if you need an increase in this limit. * * Create a request for the method "instanceGroupManagers.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where you want to create the managed instance group. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManager} * @return the request */ public Insert insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.InstanceGroupManager content) throws java.io.IOException { Insert result = new Insert(project, zone, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a managed instance group using the information that you specify in the request. After * the group is created, instances in the group are created using the specified instance template. * This operation is marked as DONE when the group is created even if the instances in the group * have not yet been created. You must separately verify the status of the individual instances * with the listmanagedinstances method. A managed instance group can have up to 1000 VM instances * per group. Please contact Cloud Support if you need an increase in this limit. * * Create a request for the method "instanceGroupManagers.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where you want to create the managed instance group. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManager} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.InstanceGroupManager content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where you want to create the managed instance group. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where you want to create the managed instance group. */ public java.lang.String getZone() { return zone; } /** The name of the zone where you want to create the managed instance group. */ public Insert setZone(java.lang.String zone) { this.zone = zone; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of managed instance groups that are contained within the specified project and * zone. * * Create a request for the method "instanceGroupManagers.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves a list of managed instance groups that are contained within the specified project and * zone. * * Create a request for the method "instanceGroupManagers.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceGroupManagerList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the managed instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the managed instance group is located. */ public List setZone(java.lang.String zone) { this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Lists all errors thrown by actions on instances for a given managed instance group. The filter * and orderBy query parameters are not supported. * * Create a request for the method "instanceGroupManagers.listErrors". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListErrors#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. It should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It must be a string that meets the requirements in RFC1035, * or an unsigned long integer: must match regexp pattern: * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. * @return the request */ public ListErrors listErrors(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager) throws java.io.IOException { ListErrors result = new ListErrors(project, zone, instanceGroupManager); initialize(result); return result; } public class ListErrors extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists all errors thrown by actions on instances for a given managed instance group. The filter * and orderBy query parameters are not supported. * * Create a request for the method "instanceGroupManagers.listErrors". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListErrors#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. It should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It must be a string that meets the requirements in RFC1035, * or an unsigned long integer: must match regexp pattern: * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. * @since 1.13 */ protected ListErrors(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceGroupManagersListErrorsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @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 ListErrors set$Xgafv(java.lang.String $Xgafv) { return (ListErrors) super.set$Xgafv($Xgafv); } @Override public ListErrors setAccessToken(java.lang.String accessToken) { return (ListErrors) super.setAccessToken(accessToken); } @Override public ListErrors setAlt(java.lang.String alt) { return (ListErrors) super.setAlt(alt); } @Override public ListErrors setCallback(java.lang.String callback) { return (ListErrors) super.setCallback(callback); } @Override public ListErrors setFields(java.lang.String fields) { return (ListErrors) super.setFields(fields); } @Override public ListErrors setKey(java.lang.String key) { return (ListErrors) super.setKey(key); } @Override public ListErrors setOauthToken(java.lang.String oauthToken) { return (ListErrors) super.setOauthToken(oauthToken); } @Override public ListErrors setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListErrors) super.setPrettyPrint(prettyPrint); } @Override public ListErrors setQuotaUser(java.lang.String quotaUser) { return (ListErrors) super.setQuotaUser(quotaUser); } @Override public ListErrors setUploadType(java.lang.String uploadType) { return (ListErrors) super.setUploadType(uploadType); } @Override public ListErrors setUploadProtocol(java.lang.String uploadProtocol) { return (ListErrors) super.setUploadProtocol(uploadProtocol); } @Override public ListErrors setUserIp(java.lang.String userIp) { return (ListErrors) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListErrors setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the managed instance group is located. It should conform to * RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. It should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the managed instance group is located. It should conform to * RFC1035. */ public ListErrors setZone(java.lang.String zone) { this.zone = zone; return this; } /** * The name of the managed instance group. It must be a string that meets the requirements in * RFC1035, or an unsigned long integer: must match regexp pattern: * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** * The name of the managed instance group. It must be a string that meets the requirements in * RFC1035, or an unsigned long integer: must match regexp pattern: * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. */ public ListErrors setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListErrors setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListErrors setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListErrors setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListErrors setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListErrors setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListErrors set(String parameterName, Object value) { return (ListErrors) super.set(parameterName, value); } } /** * Lists all of the instances in the managed instance group. Each instance in the list has a * currentAction, which indicates the action that the managed instance group is performing on the * instance. For example, if the group is still creating an instance, the currentAction is CREATING. * If a previous action failed, the list displays the errors for that failed action. The orderBy * query parameter is not supported. The `pageToken` query parameter is supported only if the * group's `listManagedInstancesResults` field is set to `PAGINATED`. * * Create a request for the method "instanceGroupManagers.listManagedInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListManagedInstances#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @return the request */ public ListManagedInstances listManagedInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager) throws java.io.IOException { ListManagedInstances result = new ListManagedInstances(project, zone, instanceGroupManager); initialize(result); return result; } public class ListManagedInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists all of the instances in the managed instance group. Each instance in the list has a * currentAction, which indicates the action that the managed instance group is performing on the * instance. For example, if the group is still creating an instance, the currentAction is * CREATING. If a previous action failed, the list displays the errors for that failed action. The * orderBy query parameter is not supported. The `pageToken` query parameter is supported only if * the group's `listManagedInstancesResults` field is set to `PAGINATED`. * * Create a request for the method "instanceGroupManagers.listManagedInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListManagedInstances#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @since 1.13 */ protected ListManagedInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.InstanceGroupManagersListManagedInstancesResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public ListManagedInstances set$Xgafv(java.lang.String $Xgafv) { return (ListManagedInstances) super.set$Xgafv($Xgafv); } @Override public ListManagedInstances setAccessToken(java.lang.String accessToken) { return (ListManagedInstances) super.setAccessToken(accessToken); } @Override public ListManagedInstances setAlt(java.lang.String alt) { return (ListManagedInstances) super.setAlt(alt); } @Override public ListManagedInstances setCallback(java.lang.String callback) { return (ListManagedInstances) super.setCallback(callback); } @Override public ListManagedInstances setFields(java.lang.String fields) { return (ListManagedInstances) super.setFields(fields); } @Override public ListManagedInstances setKey(java.lang.String key) { return (ListManagedInstances) super.setKey(key); } @Override public ListManagedInstances setOauthToken(java.lang.String oauthToken) { return (ListManagedInstances) super.setOauthToken(oauthToken); } @Override public ListManagedInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListManagedInstances) super.setPrettyPrint(prettyPrint); } @Override public ListManagedInstances setQuotaUser(java.lang.String quotaUser) { return (ListManagedInstances) super.setQuotaUser(quotaUser); } @Override public ListManagedInstances setUploadType(java.lang.String uploadType) { return (ListManagedInstances) super.setUploadType(uploadType); } @Override public ListManagedInstances setUploadProtocol(java.lang.String uploadProtocol) { return (ListManagedInstances) super.setUploadProtocol(uploadProtocol); } @Override public ListManagedInstances setUserIp(java.lang.String userIp) { return (ListManagedInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListManagedInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the managed instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the managed instance group is located. */ public ListManagedInstances setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. */ public ListManagedInstances setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListManagedInstances setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListManagedInstances setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListManagedInstances setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListManagedInstances setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListManagedInstances setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListManagedInstances set(String parameterName, Object value) { return (ListManagedInstances) super.set(parameterName, value); } } /** * Lists all of the per-instance configurations defined for the managed instance group. The orderBy * query parameter is not supported. * * Create a request for the method "instanceGroupManagers.listPerInstanceConfigs". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListPerInstanceConfigs#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. It should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @return the request */ public ListPerInstanceConfigs listPerInstanceConfigs(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager) throws java.io.IOException { ListPerInstanceConfigs result = new ListPerInstanceConfigs(project, zone, instanceGroupManager); initialize(result); return result; } public class ListPerInstanceConfigs extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists all of the per-instance configurations defined for the managed instance group. The * orderBy query parameter is not supported. * * Create a request for the method "instanceGroupManagers.listPerInstanceConfigs". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListPerInstanceConfigs#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. It should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @since 1.13 */ protected ListPerInstanceConfigs(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.InstanceGroupManagersListPerInstanceConfigsResp.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public ListPerInstanceConfigs set$Xgafv(java.lang.String $Xgafv) { return (ListPerInstanceConfigs) super.set$Xgafv($Xgafv); } @Override public ListPerInstanceConfigs setAccessToken(java.lang.String accessToken) { return (ListPerInstanceConfigs) super.setAccessToken(accessToken); } @Override public ListPerInstanceConfigs setAlt(java.lang.String alt) { return (ListPerInstanceConfigs) super.setAlt(alt); } @Override public ListPerInstanceConfigs setCallback(java.lang.String callback) { return (ListPerInstanceConfigs) super.setCallback(callback); } @Override public ListPerInstanceConfigs setFields(java.lang.String fields) { return (ListPerInstanceConfigs) super.setFields(fields); } @Override public ListPerInstanceConfigs setKey(java.lang.String key) { return (ListPerInstanceConfigs) super.setKey(key); } @Override public ListPerInstanceConfigs setOauthToken(java.lang.String oauthToken) { return (ListPerInstanceConfigs) super.setOauthToken(oauthToken); } @Override public ListPerInstanceConfigs setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListPerInstanceConfigs) super.setPrettyPrint(prettyPrint); } @Override public ListPerInstanceConfigs setQuotaUser(java.lang.String quotaUser) { return (ListPerInstanceConfigs) super.setQuotaUser(quotaUser); } @Override public ListPerInstanceConfigs setUploadType(java.lang.String uploadType) { return (ListPerInstanceConfigs) super.setUploadType(uploadType); } @Override public ListPerInstanceConfigs setUploadProtocol(java.lang.String uploadProtocol) { return (ListPerInstanceConfigs) super.setUploadProtocol(uploadProtocol); } @Override public ListPerInstanceConfigs setUserIp(java.lang.String userIp) { return (ListPerInstanceConfigs) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListPerInstanceConfigs setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the managed instance group is located. It should conform to * RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. It should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the managed instance group is located. It should conform to * RFC1035. */ public ListPerInstanceConfigs setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group. It should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. It should conform to RFC1035. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. It should conform to RFC1035. */ public ListPerInstanceConfigs setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListPerInstanceConfigs setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListPerInstanceConfigs setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListPerInstanceConfigs setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListPerInstanceConfigs setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListPerInstanceConfigs setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListPerInstanceConfigs set(String parameterName, Object value) { return (ListPerInstanceConfigs) super.set(parameterName, value); } } /** * Updates a managed instance group using the information that you specify in the request. This * operation is marked as DONE when the group is patched even if the instances in the group are * still in the process of being patched. You must separately verify the status of the individual * instances with the listManagedInstances method. This method supports PATCH semantics and uses the * JSON merge patch format and processing rules. If you update your group to specify a new template * or instance configuration, it's possible that your intended specification for each VM in the * group is different from the current state of that VM. To learn how to apply an updated * configuration to the VMs in a MIG, see Updating instances in a MIG. * * Create a request for the method "instanceGroupManagers.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where you want to create the managed instance group. * @param instanceGroupManager The name of the instance group manager. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManager} * @return the request */ public Patch patch(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManager content) throws java.io.IOException { Patch result = new Patch(project, zone, instanceGroupManager, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Updates a managed instance group using the information that you specify in the request. This * operation is marked as DONE when the group is patched even if the instances in the group are * still in the process of being patched. You must separately verify the status of the individual * instances with the listManagedInstances method. This method supports PATCH semantics and uses * the JSON merge patch format and processing rules. If you update your group to specify a new * template or instance configuration, it's possible that your intended specification for each VM * in the group is different from the current state of that VM. To learn how to apply an updated * configuration to the VMs in a MIG, see Updating instances in a MIG. * * Create a request for the method "instanceGroupManagers.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone where you want to create the managed instance group. * @param instanceGroupManager The name of the instance group manager. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManager} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManager content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where you want to create the managed instance group. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where you want to create the managed instance group. */ public java.lang.String getZone() { return zone; } /** The name of the zone where you want to create the managed instance group. */ public Patch setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the instance group manager. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the instance group manager. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the instance group manager. */ public Patch setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Inserts or patches per-instance configurations for the managed instance group. * perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. * * Create a request for the method "instanceGroupManagers.patchPerInstanceConfigs". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link PatchPerInstanceConfigs#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. It should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersPatchPerInstanceConfigsReq} * @return the request */ public PatchPerInstanceConfigs patchPerInstanceConfigs(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersPatchPerInstanceConfigsReq content) throws java.io.IOException { PatchPerInstanceConfigs result = new PatchPerInstanceConfigs(project, zone, instanceGroupManager, content); initialize(result); return result; } public class PatchPerInstanceConfigs extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Inserts or patches per-instance configurations for the managed instance group. * perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. * * Create a request for the method "instanceGroupManagers.patchPerInstanceConfigs". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link PatchPerInstanceConfigs#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. It should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersPatchPerInstanceConfigsReq} * @since 1.13 */ protected PatchPerInstanceConfigs(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersPatchPerInstanceConfigsReq content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public PatchPerInstanceConfigs set$Xgafv(java.lang.String $Xgafv) { return (PatchPerInstanceConfigs) super.set$Xgafv($Xgafv); } @Override public PatchPerInstanceConfigs setAccessToken(java.lang.String accessToken) { return (PatchPerInstanceConfigs) super.setAccessToken(accessToken); } @Override public PatchPerInstanceConfigs setAlt(java.lang.String alt) { return (PatchPerInstanceConfigs) super.setAlt(alt); } @Override public PatchPerInstanceConfigs setCallback(java.lang.String callback) { return (PatchPerInstanceConfigs) super.setCallback(callback); } @Override public PatchPerInstanceConfigs setFields(java.lang.String fields) { return (PatchPerInstanceConfigs) super.setFields(fields); } @Override public PatchPerInstanceConfigs setKey(java.lang.String key) { return (PatchPerInstanceConfigs) super.setKey(key); } @Override public PatchPerInstanceConfigs setOauthToken(java.lang.String oauthToken) { return (PatchPerInstanceConfigs) super.setOauthToken(oauthToken); } @Override public PatchPerInstanceConfigs setPrettyPrint(java.lang.Boolean prettyPrint) { return (PatchPerInstanceConfigs) super.setPrettyPrint(prettyPrint); } @Override public PatchPerInstanceConfigs setQuotaUser(java.lang.String quotaUser) { return (PatchPerInstanceConfigs) super.setQuotaUser(quotaUser); } @Override public PatchPerInstanceConfigs setUploadType(java.lang.String uploadType) { return (PatchPerInstanceConfigs) super.setUploadType(uploadType); } @Override public PatchPerInstanceConfigs setUploadProtocol(java.lang.String uploadProtocol) { return (PatchPerInstanceConfigs) super.setUploadProtocol(uploadProtocol); } @Override public PatchPerInstanceConfigs setUserIp(java.lang.String userIp) { return (PatchPerInstanceConfigs) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public PatchPerInstanceConfigs setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the managed instance group is located. It should conform to * RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. It should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the managed instance group is located. It should conform to * RFC1035. */ public PatchPerInstanceConfigs setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group. It should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. It should conform to RFC1035. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. It should conform to RFC1035. */ public PatchPerInstanceConfigs setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public PatchPerInstanceConfigs setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public PatchPerInstanceConfigs set(String parameterName, Object value) { return (PatchPerInstanceConfigs) super.set(parameterName, value); } } /** * Flags the specified VM instances in the managed instance group to be immediately recreated. Each * instance is recreated using the group's current configuration. This operation is marked as DONE * when the flag is set even if the instances have not yet been recreated. You must separately * verify the status of each instance by checking its currentAction field; for more information, see * Checking the status of managed instances. If the group is part of a backend service that has * enabled connection draining, it can take up to 60 seconds after the connection draining duration * has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 * instances with this method per request. * * Create a request for the method "instanceGroupManagers.recreateInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RecreateInstances#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersRecreateInstancesRequest} * @return the request */ public RecreateInstances recreateInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersRecreateInstancesRequest content) throws java.io.IOException { RecreateInstances result = new RecreateInstances(project, zone, instanceGroupManager, content); initialize(result); return result; } public class RecreateInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Flags the specified VM instances in the managed instance group to be immediately recreated. * Each instance is recreated using the group's current configuration. This operation is marked as * DONE when the flag is set even if the instances have not yet been recreated. You must * separately verify the status of each instance by checking its currentAction field; for more * information, see Checking the status of managed instances. If the group is part of a backend * service that has enabled connection draining, it can take up to 60 seconds after the connection * draining duration has elapsed before the VM instance is removed or deleted. You can specify a * maximum of 1000 instances with this method per request. * * Create a request for the method "instanceGroupManagers.recreateInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RecreateInstances#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersRecreateInstancesRequest} * @since 1.13 */ protected RecreateInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersRecreateInstancesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public RecreateInstances set$Xgafv(java.lang.String $Xgafv) { return (RecreateInstances) super.set$Xgafv($Xgafv); } @Override public RecreateInstances setAccessToken(java.lang.String accessToken) { return (RecreateInstances) super.setAccessToken(accessToken); } @Override public RecreateInstances setAlt(java.lang.String alt) { return (RecreateInstances) super.setAlt(alt); } @Override public RecreateInstances setCallback(java.lang.String callback) { return (RecreateInstances) super.setCallback(callback); } @Override public RecreateInstances setFields(java.lang.String fields) { return (RecreateInstances) super.setFields(fields); } @Override public RecreateInstances setKey(java.lang.String key) { return (RecreateInstances) super.setKey(key); } @Override public RecreateInstances setOauthToken(java.lang.String oauthToken) { return (RecreateInstances) super.setOauthToken(oauthToken); } @Override public RecreateInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (RecreateInstances) super.setPrettyPrint(prettyPrint); } @Override public RecreateInstances setQuotaUser(java.lang.String quotaUser) { return (RecreateInstances) super.setQuotaUser(quotaUser); } @Override public RecreateInstances setUploadType(java.lang.String uploadType) { return (RecreateInstances) super.setUploadType(uploadType); } @Override public RecreateInstances setUploadProtocol(java.lang.String uploadProtocol) { return (RecreateInstances) super.setUploadProtocol(uploadProtocol); } @Override public RecreateInstances setUserIp(java.lang.String userIp) { return (RecreateInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public RecreateInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the managed instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the managed instance group is located. */ public RecreateInstances setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. */ public RecreateInstances setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public RecreateInstances setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public RecreateInstances set(String parameterName, Object value) { return (RecreateInstances) super.set(parameterName, value); } } /** * Resizes the managed instance group. If you increase the size, the group creates new instances * using the current instance template. If you decrease the size, the group deletes instances. The * resize operation is marked DONE when the resize actions are scheduled even if the group has not * yet added or deleted any instances. You must separately verify the status of the creating or * deleting actions with the listmanagedinstances method. When resizing down, the instance group * arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM * attributes when making the selection including: + The status of the VM instance. + The health of * the VM instance. + The instance template version the VM is based on. + For regional managed * instance groups, the location of the VM instance. This list is subject to change. If the group is * part of a backend service that has enabled connection draining, it can take up to 60 seconds * after the connection draining duration has elapsed before the VM instance is removed or deleted. * * Create a request for the method "instanceGroupManagers.resize". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Resize#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @param size The number of running instances that the managed instance group should maintain at any given time. * The group automatically adds or removes instances to maintain the number of instances * specified by this parameter. * @return the request */ public Resize resize(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, java.lang.Integer size) throws java.io.IOException { Resize result = new Resize(project, zone, instanceGroupManager, size); initialize(result); return result; } public class Resize extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Resizes the managed instance group. If you increase the size, the group creates new instances * using the current instance template. If you decrease the size, the group deletes instances. The * resize operation is marked DONE when the resize actions are scheduled even if the group has not * yet added or deleted any instances. You must separately verify the status of the creating or * deleting actions with the listmanagedinstances method. When resizing down, the instance group * arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM * attributes when making the selection including: + The status of the VM instance. + The health * of the VM instance. + The instance template version the VM is based on. + For regional managed * instance groups, the location of the VM instance. This list is subject to change. If the group * is part of a backend service that has enabled connection draining, it can take up to 60 seconds * after the connection draining duration has elapsed before the VM instance is removed or * deleted. * * Create a request for the method "instanceGroupManagers.resize". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Resize#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @param size The number of running instances that the managed instance group should maintain at any given time. * The group automatically adds or removes instances to maintain the number of instances * specified by this parameter. * @since 1.13 */ protected Resize(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, java.lang.Integer size) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); this.size = com.google.api.client.util.Preconditions.checkNotNull(size, "Required parameter size must be specified."); } @Override public Resize set$Xgafv(java.lang.String $Xgafv) { return (Resize) super.set$Xgafv($Xgafv); } @Override public Resize setAccessToken(java.lang.String accessToken) { return (Resize) super.setAccessToken(accessToken); } @Override public Resize setAlt(java.lang.String alt) { return (Resize) super.setAlt(alt); } @Override public Resize setCallback(java.lang.String callback) { return (Resize) super.setCallback(callback); } @Override public Resize setFields(java.lang.String fields) { return (Resize) super.setFields(fields); } @Override public Resize setKey(java.lang.String key) { return (Resize) super.setKey(key); } @Override public Resize setOauthToken(java.lang.String oauthToken) { return (Resize) super.setOauthToken(oauthToken); } @Override public Resize setPrettyPrint(java.lang.Boolean prettyPrint) { return (Resize) super.setPrettyPrint(prettyPrint); } @Override public Resize setQuotaUser(java.lang.String quotaUser) { return (Resize) super.setQuotaUser(quotaUser); } @Override public Resize setUploadType(java.lang.String uploadType) { return (Resize) super.setUploadType(uploadType); } @Override public Resize setUploadProtocol(java.lang.String uploadProtocol) { return (Resize) super.setUploadProtocol(uploadProtocol); } @Override public Resize setUserIp(java.lang.String userIp) { return (Resize) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Resize setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the managed instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the managed instance group is located. */ public Resize setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. */ public Resize setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * The number of running instances that the managed instance group should maintain at any * given time. The group automatically adds or removes instances to maintain the number of * instances specified by this parameter. */ @com.google.api.client.util.Key private java.lang.Integer size; /** The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter. */ public java.lang.Integer getSize() { return size; } /** * The number of running instances that the managed instance group should maintain at any * given time. The group automatically adds or removes instances to maintain the number of * instances specified by this parameter. */ public Resize setSize(java.lang.Integer size) { this.size = size; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Resize setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Resize set(String parameterName, Object value) { return (Resize) super.set(parameterName, value); } } /** * Specifies the instance template to use when creating new instances in this group. The templates * for existing instances in the group do not change unless you run recreateInstances, run * applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE. * * Create a request for the method "instanceGroupManagers.setInstanceTemplate". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetInstanceTemplate#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersSetInstanceTemplateRequest} * @return the request */ public SetInstanceTemplate setInstanceTemplate(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersSetInstanceTemplateRequest content) throws java.io.IOException { SetInstanceTemplate result = new SetInstanceTemplate(project, zone, instanceGroupManager, content); initialize(result); return result; } public class SetInstanceTemplate extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Specifies the instance template to use when creating new instances in this group. The templates * for existing instances in the group do not change unless you run recreateInstances, run * applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE. * * Create a request for the method "instanceGroupManagers.setInstanceTemplate". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetInstanceTemplate#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersSetInstanceTemplateRequest} * @since 1.13 */ protected SetInstanceTemplate(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersSetInstanceTemplateRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public SetInstanceTemplate set$Xgafv(java.lang.String $Xgafv) { return (SetInstanceTemplate) super.set$Xgafv($Xgafv); } @Override public SetInstanceTemplate setAccessToken(java.lang.String accessToken) { return (SetInstanceTemplate) super.setAccessToken(accessToken); } @Override public SetInstanceTemplate setAlt(java.lang.String alt) { return (SetInstanceTemplate) super.setAlt(alt); } @Override public SetInstanceTemplate setCallback(java.lang.String callback) { return (SetInstanceTemplate) super.setCallback(callback); } @Override public SetInstanceTemplate setFields(java.lang.String fields) { return (SetInstanceTemplate) super.setFields(fields); } @Override public SetInstanceTemplate setKey(java.lang.String key) { return (SetInstanceTemplate) super.setKey(key); } @Override public SetInstanceTemplate setOauthToken(java.lang.String oauthToken) { return (SetInstanceTemplate) super.setOauthToken(oauthToken); } @Override public SetInstanceTemplate setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetInstanceTemplate) super.setPrettyPrint(prettyPrint); } @Override public SetInstanceTemplate setQuotaUser(java.lang.String quotaUser) { return (SetInstanceTemplate) super.setQuotaUser(quotaUser); } @Override public SetInstanceTemplate setUploadType(java.lang.String uploadType) { return (SetInstanceTemplate) super.setUploadType(uploadType); } @Override public SetInstanceTemplate setUploadProtocol(java.lang.String uploadProtocol) { return (SetInstanceTemplate) super.setUploadProtocol(uploadProtocol); } @Override public SetInstanceTemplate setUserIp(java.lang.String userIp) { return (SetInstanceTemplate) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetInstanceTemplate setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the managed instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the managed instance group is located. */ public SetInstanceTemplate setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. */ public SetInstanceTemplate setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetInstanceTemplate setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetInstanceTemplate set(String parameterName, Object value) { return (SetInstanceTemplate) super.set(parameterName, value); } } /** * Modifies the target pools to which all instances in this managed instance group are assigned. The * target pools automatically apply to all of the instances in the managed instance group. This * operation is marked DONE when you make the request even if the instances have not yet been added * to their target pools. The change might take some time to apply to all of the instances in the * group depending on the size of the group. * * Create a request for the method "instanceGroupManagers.setTargetPools". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetTargetPools#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersSetTargetPoolsRequest} * @return the request */ public SetTargetPools setTargetPools(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersSetTargetPoolsRequest content) throws java.io.IOException { SetTargetPools result = new SetTargetPools(project, zone, instanceGroupManager, content); initialize(result); return result; } public class SetTargetPools extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Modifies the target pools to which all instances in this managed instance group are assigned. * The target pools automatically apply to all of the instances in the managed instance group. * This operation is marked DONE when you make the request even if the instances have not yet been * added to their target pools. The change might take some time to apply to all of the instances * in the group depending on the size of the group. * * Create a request for the method "instanceGroupManagers.setTargetPools". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetTargetPools#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. * @param instanceGroupManager The name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersSetTargetPoolsRequest} * @since 1.13 */ protected SetTargetPools(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersSetTargetPoolsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public SetTargetPools set$Xgafv(java.lang.String $Xgafv) { return (SetTargetPools) super.set$Xgafv($Xgafv); } @Override public SetTargetPools setAccessToken(java.lang.String accessToken) { return (SetTargetPools) super.setAccessToken(accessToken); } @Override public SetTargetPools setAlt(java.lang.String alt) { return (SetTargetPools) super.setAlt(alt); } @Override public SetTargetPools setCallback(java.lang.String callback) { return (SetTargetPools) super.setCallback(callback); } @Override public SetTargetPools setFields(java.lang.String fields) { return (SetTargetPools) super.setFields(fields); } @Override public SetTargetPools setKey(java.lang.String key) { return (SetTargetPools) super.setKey(key); } @Override public SetTargetPools setOauthToken(java.lang.String oauthToken) { return (SetTargetPools) super.setOauthToken(oauthToken); } @Override public SetTargetPools setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetTargetPools) super.setPrettyPrint(prettyPrint); } @Override public SetTargetPools setQuotaUser(java.lang.String quotaUser) { return (SetTargetPools) super.setQuotaUser(quotaUser); } @Override public SetTargetPools setUploadType(java.lang.String uploadType) { return (SetTargetPools) super.setUploadType(uploadType); } @Override public SetTargetPools setUploadProtocol(java.lang.String uploadProtocol) { return (SetTargetPools) super.setUploadProtocol(uploadProtocol); } @Override public SetTargetPools setUserIp(java.lang.String userIp) { return (SetTargetPools) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetTargetPools setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the managed instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the managed instance group is located. */ public SetTargetPools setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. */ public SetTargetPools setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetTargetPools setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetTargetPools set(String parameterName, Object value) { return (SetTargetPools) super.set(parameterName, value); } } /** * Inserts or updates per-instance configurations for the managed instance group. * perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. * * Create a request for the method "instanceGroupManagers.updatePerInstanceConfigs". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link UpdatePerInstanceConfigs#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. It should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersUpdatePerInstanceConfigsReq} * @return the request */ public UpdatePerInstanceConfigs updatePerInstanceConfigs(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersUpdatePerInstanceConfigsReq content) throws java.io.IOException { UpdatePerInstanceConfigs result = new UpdatePerInstanceConfigs(project, zone, instanceGroupManager, content); initialize(result); return result; } public class UpdatePerInstanceConfigs extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Inserts or updates per-instance configurations for the managed instance group. * perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. * * Create a request for the method "instanceGroupManagers.updatePerInstanceConfigs". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link UpdatePerInstanceConfigs#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the managed instance group is located. It should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManagersUpdatePerInstanceConfigsReq} * @since 1.13 */ protected UpdatePerInstanceConfigs(java.lang.String project, java.lang.String zone, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManagersUpdatePerInstanceConfigsReq content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public UpdatePerInstanceConfigs set$Xgafv(java.lang.String $Xgafv) { return (UpdatePerInstanceConfigs) super.set$Xgafv($Xgafv); } @Override public UpdatePerInstanceConfigs setAccessToken(java.lang.String accessToken) { return (UpdatePerInstanceConfigs) super.setAccessToken(accessToken); } @Override public UpdatePerInstanceConfigs setAlt(java.lang.String alt) { return (UpdatePerInstanceConfigs) super.setAlt(alt); } @Override public UpdatePerInstanceConfigs setCallback(java.lang.String callback) { return (UpdatePerInstanceConfigs) super.setCallback(callback); } @Override public UpdatePerInstanceConfigs setFields(java.lang.String fields) { return (UpdatePerInstanceConfigs) super.setFields(fields); } @Override public UpdatePerInstanceConfigs setKey(java.lang.String key) { return (UpdatePerInstanceConfigs) super.setKey(key); } @Override public UpdatePerInstanceConfigs setOauthToken(java.lang.String oauthToken) { return (UpdatePerInstanceConfigs) super.setOauthToken(oauthToken); } @Override public UpdatePerInstanceConfigs setPrettyPrint(java.lang.Boolean prettyPrint) { return (UpdatePerInstanceConfigs) super.setPrettyPrint(prettyPrint); } @Override public UpdatePerInstanceConfigs setQuotaUser(java.lang.String quotaUser) { return (UpdatePerInstanceConfigs) super.setQuotaUser(quotaUser); } @Override public UpdatePerInstanceConfigs setUploadType(java.lang.String uploadType) { return (UpdatePerInstanceConfigs) super.setUploadType(uploadType); } @Override public UpdatePerInstanceConfigs setUploadProtocol(java.lang.String uploadProtocol) { return (UpdatePerInstanceConfigs) super.setUploadProtocol(uploadProtocol); } @Override public UpdatePerInstanceConfigs setUserIp(java.lang.String userIp) { return (UpdatePerInstanceConfigs) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public UpdatePerInstanceConfigs setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the managed instance group is located. It should conform to * RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the managed instance group is located. It should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the managed instance group is located. It should conform to * RFC1035. */ public UpdatePerInstanceConfigs setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the managed instance group. It should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. It should conform to RFC1035. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. It should conform to RFC1035. */ public UpdatePerInstanceConfigs setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public UpdatePerInstanceConfigs setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public UpdatePerInstanceConfigs set(String parameterName, Object value) { return (UpdatePerInstanceConfigs) super.set(parameterName, value); } } } /** * An accessor for creating requests from the InstanceGroups collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.InstanceGroups.List request = compute.instanceGroups().list(parameters ...)}
   * 
* * @return the resource collection */ public InstanceGroups instanceGroups() { return new InstanceGroups(); } /** * The "instanceGroups" collection of methods. */ public class InstanceGroups { /** * Adds a list of instances to the specified instance group. All of the instances in the instance * group must be in the same network/subnetwork. Read Adding instances for more information. * * Create a request for the method "instanceGroups.addInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddInstances#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the instance group is located. * @param instanceGroup The name of the instance group where you are adding instances. * @param content the {@link com.google.api.services.compute.model.InstanceGroupsAddInstancesRequest} * @return the request */ public AddInstances addInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroup, com.google.api.services.compute.model.InstanceGroupsAddInstancesRequest content) throws java.io.IOException { AddInstances result = new AddInstances(project, zone, instanceGroup, content); initialize(result); return result; } public class AddInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Adds a list of instances to the specified instance group. All of the instances in the instance * group must be in the same network/subnetwork. Read Adding instances for more information. * * Create a request for the method "instanceGroups.addInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddInstances#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the instance group is located. * @param instanceGroup The name of the instance group where you are adding instances. * @param content the {@link com.google.api.services.compute.model.InstanceGroupsAddInstancesRequest} * @since 1.13 */ protected AddInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroup, com.google.api.services.compute.model.InstanceGroupsAddInstancesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroup = com.google.api.client.util.Preconditions.checkNotNull(instanceGroup, "Required parameter instanceGroup must be specified."); } @Override public AddInstances set$Xgafv(java.lang.String $Xgafv) { return (AddInstances) super.set$Xgafv($Xgafv); } @Override public AddInstances setAccessToken(java.lang.String accessToken) { return (AddInstances) super.setAccessToken(accessToken); } @Override public AddInstances setAlt(java.lang.String alt) { return (AddInstances) super.setAlt(alt); } @Override public AddInstances setCallback(java.lang.String callback) { return (AddInstances) super.setCallback(callback); } @Override public AddInstances setFields(java.lang.String fields) { return (AddInstances) super.setFields(fields); } @Override public AddInstances setKey(java.lang.String key) { return (AddInstances) super.setKey(key); } @Override public AddInstances setOauthToken(java.lang.String oauthToken) { return (AddInstances) super.setOauthToken(oauthToken); } @Override public AddInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddInstances) super.setPrettyPrint(prettyPrint); } @Override public AddInstances setQuotaUser(java.lang.String quotaUser) { return (AddInstances) super.setQuotaUser(quotaUser); } @Override public AddInstances setUploadType(java.lang.String uploadType) { return (AddInstances) super.setUploadType(uploadType); } @Override public AddInstances setUploadProtocol(java.lang.String uploadProtocol) { return (AddInstances) super.setUploadProtocol(uploadProtocol); } @Override public AddInstances setUserIp(java.lang.String userIp) { return (AddInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the instance group is located. */ public AddInstances setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the instance group where you are adding instances. */ @com.google.api.client.util.Key private java.lang.String instanceGroup; /** The name of the instance group where you are adding instances. */ public java.lang.String getInstanceGroup() { return instanceGroup; } /** The name of the instance group where you are adding instances. */ public AddInstances setInstanceGroup(java.lang.String instanceGroup) { this.instanceGroup = instanceGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddInstances setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddInstances set(String parameterName, Object value) { return (AddInstances) super.set(parameterName, value); } } /** * Retrieves the list of instance groups and sorts them by zone. To prevent failure, Google * recommends that you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "instanceGroups.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/instanceGroups"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of instance groups and sorts them by zone. To prevent failure, Google * recommends that you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "instanceGroups.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceGroupAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified instance group. The instances in the group are not deleted. Note that * instance group must not belong to a backend service. Read Deleting an instance group for more * information. * * Create a request for the method "instanceGroups.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the instance group is located. * @param instanceGroup The name of the instance group to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String zone, java.lang.String instanceGroup) throws java.io.IOException { Delete result = new Delete(project, zone, instanceGroup); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Deletes the specified instance group. The instances in the group are not deleted. Note that * instance group must not belong to a backend service. Read Deleting an instance group for more * information. * * Create a request for the method "instanceGroups.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone where the instance group is located. * @param instanceGroup The name of the instance group to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String zone, java.lang.String instanceGroup) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroup = com.google.api.client.util.Preconditions.checkNotNull(instanceGroup, "Required parameter instanceGroup must be specified."); } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the instance group is located. */ public Delete setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the instance group to delete. */ @com.google.api.client.util.Key private java.lang.String instanceGroup; /** The name of the instance group to delete. */ public java.lang.String getInstanceGroup() { return instanceGroup; } /** The name of the instance group to delete. */ public Delete setInstanceGroup(java.lang.String instanceGroup) { this.instanceGroup = instanceGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified zonal instance group. Get a list of available zonal instance groups by * making a list() request. For managed instance groups, use the instanceGroupManagers or * regionInstanceGroupManagers methods instead. * * Create a request for the method "instanceGroups.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the instance group is located. * @param instanceGroup The name of the instance group. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String instanceGroup) throws java.io.IOException { Get result = new Get(project, zone, instanceGroup); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Returns the specified zonal instance group. Get a list of available zonal instance groups by * making a list() request. For managed instance groups, use the instanceGroupManagers or * regionInstanceGroupManagers methods instead. * * Create a request for the method "instanceGroups.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone where the instance group is located. * @param instanceGroup The name of the instance group. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String instanceGroup) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceGroup.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroup = com.google.api.client.util.Preconditions.checkNotNull(instanceGroup, "Required parameter instanceGroup must be specified."); } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the instance group is located. */ public Get setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroup; /** The name of the instance group. */ public java.lang.String getInstanceGroup() { return instanceGroup; } /** The name of the instance group. */ public Get setInstanceGroup(java.lang.String instanceGroup) { this.instanceGroup = instanceGroup; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates an instance group in the specified project using the parameters that are included in the * request. * * Create a request for the method "instanceGroups.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where you want to create the instance group. * @param content the {@link com.google.api.services.compute.model.InstanceGroup} * @return the request */ public Insert insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.InstanceGroup content) throws java.io.IOException { Insert result = new Insert(project, zone, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroups"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates an instance group in the specified project using the parameters that are included in * the request. * * Create a request for the method "instanceGroups.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where you want to create the instance group. * @param content the {@link com.google.api.services.compute.model.InstanceGroup} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.InstanceGroup content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where you want to create the instance group. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where you want to create the instance group. */ public java.lang.String getZone() { return zone; } /** The name of the zone where you want to create the instance group. */ public Insert setZone(java.lang.String zone) { this.zone = zone; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of zonal instance group resources contained within the specified zone. For * managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods * instead. * * Create a request for the method "instanceGroups.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the instance group is located. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroups"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of zonal instance group resources contained within the specified zone. For * managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods * instead. * * Create a request for the method "instanceGroups.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone where the instance group is located. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceGroupList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the instance group is located. */ public List setZone(java.lang.String zone) { this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Lists the instances in the specified instance group. The orderBy query parameter is not * supported. The filter query parameter is supported, but only for expressions that use `eq` * (equal) or `ne` (not equal) operators. * * Create a request for the method "instanceGroups.listInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListInstances#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the instance group is located. * @param instanceGroup The name of the instance group from which you want to generate a list of included instances. * @param content the {@link com.google.api.services.compute.model.InstanceGroupsListInstancesRequest} * @return the request */ public ListInstances listInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroup, com.google.api.services.compute.model.InstanceGroupsListInstancesRequest content) throws java.io.IOException { ListInstances result = new ListInstances(project, zone, instanceGroup, content); initialize(result); return result; } public class ListInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists the instances in the specified instance group. The orderBy query parameter is not * supported. The filter query parameter is supported, but only for expressions that use `eq` * (equal) or `ne` (not equal) operators. * * Create a request for the method "instanceGroups.listInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListInstances#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the instance group is located. * @param instanceGroup The name of the instance group from which you want to generate a list of included instances. * @param content the {@link com.google.api.services.compute.model.InstanceGroupsListInstancesRequest} * @since 1.13 */ protected ListInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroup, com.google.api.services.compute.model.InstanceGroupsListInstancesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.InstanceGroupsListInstances.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroup = com.google.api.client.util.Preconditions.checkNotNull(instanceGroup, "Required parameter instanceGroup must be specified."); } @Override public ListInstances set$Xgafv(java.lang.String $Xgafv) { return (ListInstances) super.set$Xgafv($Xgafv); } @Override public ListInstances setAccessToken(java.lang.String accessToken) { return (ListInstances) super.setAccessToken(accessToken); } @Override public ListInstances setAlt(java.lang.String alt) { return (ListInstances) super.setAlt(alt); } @Override public ListInstances setCallback(java.lang.String callback) { return (ListInstances) super.setCallback(callback); } @Override public ListInstances setFields(java.lang.String fields) { return (ListInstances) super.setFields(fields); } @Override public ListInstances setKey(java.lang.String key) { return (ListInstances) super.setKey(key); } @Override public ListInstances setOauthToken(java.lang.String oauthToken) { return (ListInstances) super.setOauthToken(oauthToken); } @Override public ListInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListInstances) super.setPrettyPrint(prettyPrint); } @Override public ListInstances setQuotaUser(java.lang.String quotaUser) { return (ListInstances) super.setQuotaUser(quotaUser); } @Override public ListInstances setUploadType(java.lang.String uploadType) { return (ListInstances) super.setUploadType(uploadType); } @Override public ListInstances setUploadProtocol(java.lang.String uploadProtocol) { return (ListInstances) super.setUploadProtocol(uploadProtocol); } @Override public ListInstances setUserIp(java.lang.String userIp) { return (ListInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the instance group is located. */ public ListInstances setZone(java.lang.String zone) { this.zone = zone; return this; } /** * The name of the instance group from which you want to generate a list of included * instances. */ @com.google.api.client.util.Key private java.lang.String instanceGroup; /** The name of the instance group from which you want to generate a list of included instances. */ public java.lang.String getInstanceGroup() { return instanceGroup; } /** * The name of the instance group from which you want to generate a list of included * instances. */ public ListInstances setInstanceGroup(java.lang.String instanceGroup) { this.instanceGroup = instanceGroup; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListInstances setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListInstances setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListInstances setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListInstances setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListInstances setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListInstances set(String parameterName, Object value) { return (ListInstances) super.set(parameterName, value); } } /** * Removes one or more instances from the specified instance group, but does not delete those * instances. If the group is part of a backend service that has enabled connection draining, it can * take up to 60 seconds after the connection draining duration before the VM instance is removed or * deleted. * * Create a request for the method "instanceGroups.removeInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RemoveInstances#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the instance group is located. * @param instanceGroup The name of the instance group where the specified instances will be removed. * @param content the {@link com.google.api.services.compute.model.InstanceGroupsRemoveInstancesRequest} * @return the request */ public RemoveInstances removeInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroup, com.google.api.services.compute.model.InstanceGroupsRemoveInstancesRequest content) throws java.io.IOException { RemoveInstances result = new RemoveInstances(project, zone, instanceGroup, content); initialize(result); return result; } public class RemoveInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Removes one or more instances from the specified instance group, but does not delete those * instances. If the group is part of a backend service that has enabled connection draining, it * can take up to 60 seconds after the connection draining duration before the VM instance is * removed or deleted. * * Create a request for the method "instanceGroups.removeInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RemoveInstances#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param zone The name of the zone where the instance group is located. * @param instanceGroup The name of the instance group where the specified instances will be removed. * @param content the {@link com.google.api.services.compute.model.InstanceGroupsRemoveInstancesRequest} * @since 1.13 */ protected RemoveInstances(java.lang.String project, java.lang.String zone, java.lang.String instanceGroup, com.google.api.services.compute.model.InstanceGroupsRemoveInstancesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroup = com.google.api.client.util.Preconditions.checkNotNull(instanceGroup, "Required parameter instanceGroup must be specified."); } @Override public RemoveInstances set$Xgafv(java.lang.String $Xgafv) { return (RemoveInstances) super.set$Xgafv($Xgafv); } @Override public RemoveInstances setAccessToken(java.lang.String accessToken) { return (RemoveInstances) super.setAccessToken(accessToken); } @Override public RemoveInstances setAlt(java.lang.String alt) { return (RemoveInstances) super.setAlt(alt); } @Override public RemoveInstances setCallback(java.lang.String callback) { return (RemoveInstances) super.setCallback(callback); } @Override public RemoveInstances setFields(java.lang.String fields) { return (RemoveInstances) super.setFields(fields); } @Override public RemoveInstances setKey(java.lang.String key) { return (RemoveInstances) super.setKey(key); } @Override public RemoveInstances setOauthToken(java.lang.String oauthToken) { return (RemoveInstances) super.setOauthToken(oauthToken); } @Override public RemoveInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveInstances) super.setPrettyPrint(prettyPrint); } @Override public RemoveInstances setQuotaUser(java.lang.String quotaUser) { return (RemoveInstances) super.setQuotaUser(quotaUser); } @Override public RemoveInstances setUploadType(java.lang.String uploadType) { return (RemoveInstances) super.setUploadType(uploadType); } @Override public RemoveInstances setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveInstances) super.setUploadProtocol(uploadProtocol); } @Override public RemoveInstances setUserIp(java.lang.String userIp) { return (RemoveInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public RemoveInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the instance group is located. */ public RemoveInstances setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the instance group where the specified instances will be removed. */ @com.google.api.client.util.Key private java.lang.String instanceGroup; /** The name of the instance group where the specified instances will be removed. */ public java.lang.String getInstanceGroup() { return instanceGroup; } /** The name of the instance group where the specified instances will be removed. */ public RemoveInstances setInstanceGroup(java.lang.String instanceGroup) { this.instanceGroup = instanceGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public RemoveInstances setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public RemoveInstances set(String parameterName, Object value) { return (RemoveInstances) super.set(parameterName, value); } } /** * Sets the named ports for the specified instance group. * * Create a request for the method "instanceGroups.setNamedPorts". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetNamedPorts#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the instance group is located. * @param instanceGroup The name of the instance group where the named ports are updated. * @param content the {@link com.google.api.services.compute.model.InstanceGroupsSetNamedPortsRequest} * @return the request */ public SetNamedPorts setNamedPorts(java.lang.String project, java.lang.String zone, java.lang.String instanceGroup, com.google.api.services.compute.model.InstanceGroupsSetNamedPortsRequest content) throws java.io.IOException { SetNamedPorts result = new SetNamedPorts(project, zone, instanceGroup, content); initialize(result); return result; } public class SetNamedPorts extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Sets the named ports for the specified instance group. * * Create a request for the method "instanceGroups.setNamedPorts". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetNamedPorts#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the instance group is located. * @param instanceGroup The name of the instance group where the named ports are updated. * @param content the {@link com.google.api.services.compute.model.InstanceGroupsSetNamedPortsRequest} * @since 1.13 */ protected SetNamedPorts(java.lang.String project, java.lang.String zone, java.lang.String instanceGroup, com.google.api.services.compute.model.InstanceGroupsSetNamedPortsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.instanceGroup = com.google.api.client.util.Preconditions.checkNotNull(instanceGroup, "Required parameter instanceGroup must be specified."); } @Override public SetNamedPorts set$Xgafv(java.lang.String $Xgafv) { return (SetNamedPorts) super.set$Xgafv($Xgafv); } @Override public SetNamedPorts setAccessToken(java.lang.String accessToken) { return (SetNamedPorts) super.setAccessToken(accessToken); } @Override public SetNamedPorts setAlt(java.lang.String alt) { return (SetNamedPorts) super.setAlt(alt); } @Override public SetNamedPorts setCallback(java.lang.String callback) { return (SetNamedPorts) super.setCallback(callback); } @Override public SetNamedPorts setFields(java.lang.String fields) { return (SetNamedPorts) super.setFields(fields); } @Override public SetNamedPorts setKey(java.lang.String key) { return (SetNamedPorts) super.setKey(key); } @Override public SetNamedPorts setOauthToken(java.lang.String oauthToken) { return (SetNamedPorts) super.setOauthToken(oauthToken); } @Override public SetNamedPorts setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetNamedPorts) super.setPrettyPrint(prettyPrint); } @Override public SetNamedPorts setQuotaUser(java.lang.String quotaUser) { return (SetNamedPorts) super.setQuotaUser(quotaUser); } @Override public SetNamedPorts setUploadType(java.lang.String uploadType) { return (SetNamedPorts) super.setUploadType(uploadType); } @Override public SetNamedPorts setUploadProtocol(java.lang.String uploadProtocol) { return (SetNamedPorts) super.setUploadProtocol(uploadProtocol); } @Override public SetNamedPorts setUserIp(java.lang.String userIp) { return (SetNamedPorts) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetNamedPorts setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone where the instance group is located. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the instance group is located. */ public java.lang.String getZone() { return zone; } /** The name of the zone where the instance group is located. */ public SetNamedPorts setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the instance group where the named ports are updated. */ @com.google.api.client.util.Key private java.lang.String instanceGroup; /** The name of the instance group where the named ports are updated. */ public java.lang.String getInstanceGroup() { return instanceGroup; } /** The name of the instance group where the named ports are updated. */ public SetNamedPorts setInstanceGroup(java.lang.String instanceGroup) { this.instanceGroup = instanceGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetNamedPorts setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetNamedPorts set(String parameterName, Object value) { return (SetNamedPorts) super.set(parameterName, value); } } } /** * An accessor for creating requests from the InstanceSettings collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.InstanceSettings.List request = compute.instanceSettings().list(parameters ...)}
   * 
* * @return the resource collection */ public InstanceSettings instanceSettings() { return new InstanceSettings(); } /** * The "instanceSettings" collection of methods. */ public class InstanceSettings { /** * Get Instance settings. * * Create a request for the method "instanceSettings.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @return the request */ public Get get(java.lang.String project, java.lang.String zone) throws java.io.IOException { Get result = new Get(project, zone); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceSettings"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Get Instance settings. * * Create a request for the method "instanceSettings.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone for this request. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceSettings.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Patch Instance settings * * Create a request for the method "instanceSettings.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The zone scoping this request. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.InstanceSettings} * @return the request */ public Patch patch(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.InstanceSettings content) throws java.io.IOException { Patch result = new Patch(project, zone, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instanceSettings"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Patch Instance settings * * Create a request for the method "instanceSettings.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The zone scoping this request. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.InstanceSettings} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.InstanceSettings content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The zone scoping this request. It should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The zone scoping this request. It should conform to RFC1035. */ public java.lang.String getZone() { return zone; } /** The zone scoping this request. It should conform to RFC1035. */ public Patch setZone(java.lang.String zone) { this.zone = zone; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** update_mask indicates fields to be updated as part of this request. */ @com.google.api.client.util.Key private String updateMask; /** update_mask indicates fields to be updated as part of this request. */ public String getUpdateMask() { return updateMask; } /** update_mask indicates fields to be updated as part of this request. */ public Patch setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } } /** * An accessor for creating requests from the InstanceTemplates collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.InstanceTemplates.List request = compute.instanceTemplates().list(parameters ...)}
   * 
* * @return the resource collection */ public InstanceTemplates instanceTemplates() { return new InstanceTemplates(); } /** * The "instanceTemplates" collection of methods. */ public class InstanceTemplates { /** * Retrieves the list of all InstanceTemplates resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the `returnPartialSuccess` * parameter to `true`. * * Create a request for the method "instanceTemplates.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Name of the project scoping this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/instanceTemplates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of all InstanceTemplates resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the * `returnPartialSuccess` parameter to `true`. * * Create a request for the method "instanceTemplates.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Name of the project scoping this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceTemplateAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Name of the project scoping this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Name of the project scoping this request. */ public java.lang.String getProject() { return project; } /** Name of the project scoping this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified instance template. Deleting an instance template is permanent and cannot be * undone. It is not possible to delete templates that are already in use by a managed instance * group. * * Create a request for the method "instanceTemplates.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param instanceTemplate The name of the instance template to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String instanceTemplate) throws java.io.IOException { Delete result = new Delete(project, instanceTemplate); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/instanceTemplates/{instanceTemplate}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern INSTANCE_TEMPLATE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified instance template. Deleting an instance template is permanent and cannot * be undone. It is not possible to delete templates that are already in use by a managed instance * group. * * Create a request for the method "instanceTemplates.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param instanceTemplate The name of the instance template to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String instanceTemplate) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.instanceTemplate = com.google.api.client.util.Preconditions.checkNotNull(instanceTemplate, "Required parameter instanceTemplate must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_TEMPLATE_PATTERN.matcher(instanceTemplate).matches(), "Parameter instanceTemplate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the instance template to delete. */ @com.google.api.client.util.Key private java.lang.String instanceTemplate; /** The name of the instance template to delete. */ public java.lang.String getInstanceTemplate() { return instanceTemplate; } /** The name of the instance template to delete. */ public Delete setInstanceTemplate(java.lang.String instanceTemplate) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_TEMPLATE_PATTERN.matcher(instanceTemplate).matches(), "Parameter instanceTemplate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instanceTemplate = instanceTemplate; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified instance template. * * Create a request for the method "instanceTemplates.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param instanceTemplate The name of the instance template. * @return the request */ public Get get(java.lang.String project, java.lang.String instanceTemplate) throws java.io.IOException { Get result = new Get(project, instanceTemplate); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/instanceTemplates/{instanceTemplate}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern INSTANCE_TEMPLATE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified instance template. * * Create a request for the method "instanceTemplates.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param instanceTemplate The name of the instance template. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String instanceTemplate) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceTemplate.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.instanceTemplate = com.google.api.client.util.Preconditions.checkNotNull(instanceTemplate, "Required parameter instanceTemplate must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_TEMPLATE_PATTERN.matcher(instanceTemplate).matches(), "Parameter instanceTemplate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the instance template. */ @com.google.api.client.util.Key private java.lang.String instanceTemplate; /** The name of the instance template. */ public java.lang.String getInstanceTemplate() { return instanceTemplate; } /** The name of the instance template. */ public Get setInstanceTemplate(java.lang.String instanceTemplate) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_TEMPLATE_PATTERN.matcher(instanceTemplate).matches(), "Parameter instanceTemplate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instanceTemplate = instanceTemplate; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "instanceTemplates.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/instanceTemplates/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "instanceTemplates.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates an instance template in the specified project using the data that is included in the * request. If you are creating a new template to update an existing instance group, your new * instance template must use the same network or, if applicable, the same subnetwork as the * original template. * * Create a request for the method "instanceTemplates.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.InstanceTemplate} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.InstanceTemplate content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/instanceTemplates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates an instance template in the specified project using the data that is included in the * request. If you are creating a new template to update an existing instance group, your new * instance template must use the same network or, if applicable, the same subnetwork as the * original template. * * Create a request for the method "instanceTemplates.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.InstanceTemplate} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.InstanceTemplate content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of instance templates that are contained within the specified project. * * Create a request for the method "instanceTemplates.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/instanceTemplates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves a list of instance templates that are contained within the specified project. * * Create a request for the method "instanceTemplates.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceTemplateList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "instanceTemplates.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/instanceTemplates/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "instanceTemplates.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "instanceTemplates.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/instanceTemplates/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "instanceTemplates.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Instances collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Instances.List request = compute.instances().list(parameters ...)}
   * 
* * @return the resource collection */ public Instances instances() { return new Instances(); } /** * The "instances" collection of methods. */ public class Instances { /** * Adds an access config to an instance's network interface. * * Create a request for the method "instances.addAccessConfig". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddAccessConfig#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param networkInterface The name of the network interface to add to this instance. * @param content the {@link com.google.api.services.compute.model.AccessConfig} * @return the request */ public AddAccessConfig addAccessConfig(java.lang.String project, java.lang.String zone, java.lang.String instance, java.lang.String networkInterface, com.google.api.services.compute.model.AccessConfig content) throws java.io.IOException { AddAccessConfig result = new AddAccessConfig(project, zone, instance, networkInterface, content); initialize(result); return result; } public class AddAccessConfig extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Adds an access config to an instance's network interface. * * Create a request for the method "instances.addAccessConfig". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddAccessConfig#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param networkInterface The name of the network interface to add to this instance. * @param content the {@link com.google.api.services.compute.model.AccessConfig} * @since 1.13 */ protected AddAccessConfig(java.lang.String project, java.lang.String zone, java.lang.String instance, java.lang.String networkInterface, com.google.api.services.compute.model.AccessConfig content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.networkInterface = com.google.api.client.util.Preconditions.checkNotNull(networkInterface, "Required parameter networkInterface must be specified."); } @Override public AddAccessConfig set$Xgafv(java.lang.String $Xgafv) { return (AddAccessConfig) super.set$Xgafv($Xgafv); } @Override public AddAccessConfig setAccessToken(java.lang.String accessToken) { return (AddAccessConfig) super.setAccessToken(accessToken); } @Override public AddAccessConfig setAlt(java.lang.String alt) { return (AddAccessConfig) super.setAlt(alt); } @Override public AddAccessConfig setCallback(java.lang.String callback) { return (AddAccessConfig) super.setCallback(callback); } @Override public AddAccessConfig setFields(java.lang.String fields) { return (AddAccessConfig) super.setFields(fields); } @Override public AddAccessConfig setKey(java.lang.String key) { return (AddAccessConfig) super.setKey(key); } @Override public AddAccessConfig setOauthToken(java.lang.String oauthToken) { return (AddAccessConfig) super.setOauthToken(oauthToken); } @Override public AddAccessConfig setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddAccessConfig) super.setPrettyPrint(prettyPrint); } @Override public AddAccessConfig setQuotaUser(java.lang.String quotaUser) { return (AddAccessConfig) super.setQuotaUser(quotaUser); } @Override public AddAccessConfig setUploadType(java.lang.String uploadType) { return (AddAccessConfig) super.setUploadType(uploadType); } @Override public AddAccessConfig setUploadProtocol(java.lang.String uploadProtocol) { return (AddAccessConfig) super.setUploadProtocol(uploadProtocol); } @Override public AddAccessConfig setUserIp(java.lang.String userIp) { return (AddAccessConfig) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddAccessConfig setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public AddAccessConfig setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The instance name for this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** The instance name for this request. */ public java.lang.String getInstance() { return instance; } /** The instance name for this request. */ public AddAccessConfig setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** The name of the network interface to add to this instance. */ @com.google.api.client.util.Key private java.lang.String networkInterface; /** The name of the network interface to add to this instance. */ public java.lang.String getNetworkInterface() { return networkInterface; } /** The name of the network interface to add to this instance. */ public AddAccessConfig setNetworkInterface(java.lang.String networkInterface) { this.networkInterface = networkInterface; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddAccessConfig setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddAccessConfig set(String parameterName, Object value) { return (AddAccessConfig) super.set(parameterName, value); } } /** * Adds existing resource policies to an instance. You can only add one policy right now which will * be applied to this instance for scheduling live migrations. * * Create a request for the method "instances.addResourcePolicies". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddResourcePolicies#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param content the {@link com.google.api.services.compute.model.InstancesAddResourcePoliciesRequest} * @return the request */ public AddResourcePolicies addResourcePolicies(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesAddResourcePoliciesRequest content) throws java.io.IOException { AddResourcePolicies result = new AddResourcePolicies(project, zone, instance, content); initialize(result); return result; } public class AddResourcePolicies extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Adds existing resource policies to an instance. You can only add one policy right now which * will be applied to this instance for scheduling live migrations. * * Create a request for the method "instances.addResourcePolicies". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddResourcePolicies#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param content the {@link com.google.api.services.compute.model.InstancesAddResourcePoliciesRequest} * @since 1.13 */ protected AddResourcePolicies(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesAddResourcePoliciesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public AddResourcePolicies set$Xgafv(java.lang.String $Xgafv) { return (AddResourcePolicies) super.set$Xgafv($Xgafv); } @Override public AddResourcePolicies setAccessToken(java.lang.String accessToken) { return (AddResourcePolicies) super.setAccessToken(accessToken); } @Override public AddResourcePolicies setAlt(java.lang.String alt) { return (AddResourcePolicies) super.setAlt(alt); } @Override public AddResourcePolicies setCallback(java.lang.String callback) { return (AddResourcePolicies) super.setCallback(callback); } @Override public AddResourcePolicies setFields(java.lang.String fields) { return (AddResourcePolicies) super.setFields(fields); } @Override public AddResourcePolicies setKey(java.lang.String key) { return (AddResourcePolicies) super.setKey(key); } @Override public AddResourcePolicies setOauthToken(java.lang.String oauthToken) { return (AddResourcePolicies) super.setOauthToken(oauthToken); } @Override public AddResourcePolicies setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddResourcePolicies) super.setPrettyPrint(prettyPrint); } @Override public AddResourcePolicies setQuotaUser(java.lang.String quotaUser) { return (AddResourcePolicies) super.setQuotaUser(quotaUser); } @Override public AddResourcePolicies setUploadType(java.lang.String uploadType) { return (AddResourcePolicies) super.setUploadType(uploadType); } @Override public AddResourcePolicies setUploadProtocol(java.lang.String uploadProtocol) { return (AddResourcePolicies) super.setUploadProtocol(uploadProtocol); } @Override public AddResourcePolicies setUserIp(java.lang.String userIp) { return (AddResourcePolicies) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddResourcePolicies setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public AddResourcePolicies setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The instance name for this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** The instance name for this request. */ public java.lang.String getInstance() { return instance; } /** The instance name for this request. */ public AddResourcePolicies setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddResourcePolicies setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddResourcePolicies set(String parameterName, Object value) { return (AddResourcePolicies) super.set(parameterName, value); } } /** * Retrieves an aggregated list of all of the instances in your project across all regions and * zones. The performance of this method degrades when a filter is specified on a project that has a * very large number of instances. To prevent failure, Google recommends that you set the * `returnPartialSuccess` parameter to `true`. * * Create a request for the method "instances.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/instances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of all of the instances in your project across all regions and * zones. The performance of this method degrades when a filter is specified on a project that has * a very large number of instances. To prevent failure, Google recommends that you set the * `returnPartialSuccess` parameter to `true`. * * Create a request for the method "instances.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Attaches an existing Disk resource to an instance. You must first create the disk before you can * attach it. It is not possible to create and attach a disk at the same time. For more information, * read Adding a persistent disk to your instance. * * Create a request for the method "instances.attachDisk". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AttachDisk#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param content the {@link com.google.api.services.compute.model.AttachedDisk} * @return the request */ public AttachDisk attachDisk(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.AttachedDisk content) throws java.io.IOException { AttachDisk result = new AttachDisk(project, zone, instance, content); initialize(result); return result; } public class AttachDisk extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/attachDisk"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Attaches an existing Disk resource to an instance. You must first create the disk before you * can attach it. It is not possible to create and attach a disk at the same time. For more * information, read Adding a persistent disk to your instance. * * Create a request for the method "instances.attachDisk". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AttachDisk#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param content the {@link com.google.api.services.compute.model.AttachedDisk} * @since 1.13 */ protected AttachDisk(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.AttachedDisk content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public AttachDisk set$Xgafv(java.lang.String $Xgafv) { return (AttachDisk) super.set$Xgafv($Xgafv); } @Override public AttachDisk setAccessToken(java.lang.String accessToken) { return (AttachDisk) super.setAccessToken(accessToken); } @Override public AttachDisk setAlt(java.lang.String alt) { return (AttachDisk) super.setAlt(alt); } @Override public AttachDisk setCallback(java.lang.String callback) { return (AttachDisk) super.setCallback(callback); } @Override public AttachDisk setFields(java.lang.String fields) { return (AttachDisk) super.setFields(fields); } @Override public AttachDisk setKey(java.lang.String key) { return (AttachDisk) super.setKey(key); } @Override public AttachDisk setOauthToken(java.lang.String oauthToken) { return (AttachDisk) super.setOauthToken(oauthToken); } @Override public AttachDisk setPrettyPrint(java.lang.Boolean prettyPrint) { return (AttachDisk) super.setPrettyPrint(prettyPrint); } @Override public AttachDisk setQuotaUser(java.lang.String quotaUser) { return (AttachDisk) super.setQuotaUser(quotaUser); } @Override public AttachDisk setUploadType(java.lang.String uploadType) { return (AttachDisk) super.setUploadType(uploadType); } @Override public AttachDisk setUploadProtocol(java.lang.String uploadProtocol) { return (AttachDisk) super.setUploadProtocol(uploadProtocol); } @Override public AttachDisk setUserIp(java.lang.String userIp) { return (AttachDisk) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AttachDisk setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public AttachDisk setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The instance name for this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** The instance name for this request. */ public java.lang.String getInstance() { return instance; } /** The instance name for this request. */ public AttachDisk setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * Whether to force attach the regional disk even if it's currently attached to another * instance. If you try to force attach a zonal disk to an instance, you will receive an * error. */ @com.google.api.client.util.Key private java.lang.Boolean forceAttach; /** Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error. */ public java.lang.Boolean getForceAttach() { return forceAttach; } /** * Whether to force attach the regional disk even if it's currently attached to another * instance. If you try to force attach a zonal disk to an instance, you will receive an * error. */ public AttachDisk setForceAttach(java.lang.Boolean forceAttach) { this.forceAttach = forceAttach; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AttachDisk setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AttachDisk set(String parameterName, Object value) { return (AttachDisk) super.set(parameterName, value); } } /** * Creates multiple instances. Count specifies the number of instances to create. For more * information, see About bulk creation of VMs. * * Create a request for the method "instances.bulkInsert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link BulkInsert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.BulkInsertInstanceResource} * @return the request */ public BulkInsert bulkInsert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.BulkInsertInstanceResource content) throws java.io.IOException { BulkInsert result = new BulkInsert(project, zone, content); initialize(result); return result; } public class BulkInsert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/bulkInsert"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates multiple instances. Count specifies the number of instances to create. For more * information, see About bulk creation of VMs. * * Create a request for the method "instances.bulkInsert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link BulkInsert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.BulkInsertInstanceResource} * @since 1.13 */ protected BulkInsert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.BulkInsertInstanceResource content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public BulkInsert set$Xgafv(java.lang.String $Xgafv) { return (BulkInsert) super.set$Xgafv($Xgafv); } @Override public BulkInsert setAccessToken(java.lang.String accessToken) { return (BulkInsert) super.setAccessToken(accessToken); } @Override public BulkInsert setAlt(java.lang.String alt) { return (BulkInsert) super.setAlt(alt); } @Override public BulkInsert setCallback(java.lang.String callback) { return (BulkInsert) super.setCallback(callback); } @Override public BulkInsert setFields(java.lang.String fields) { return (BulkInsert) super.setFields(fields); } @Override public BulkInsert setKey(java.lang.String key) { return (BulkInsert) super.setKey(key); } @Override public BulkInsert setOauthToken(java.lang.String oauthToken) { return (BulkInsert) super.setOauthToken(oauthToken); } @Override public BulkInsert setPrettyPrint(java.lang.Boolean prettyPrint) { return (BulkInsert) super.setPrettyPrint(prettyPrint); } @Override public BulkInsert setQuotaUser(java.lang.String quotaUser) { return (BulkInsert) super.setQuotaUser(quotaUser); } @Override public BulkInsert setUploadType(java.lang.String uploadType) { return (BulkInsert) super.setUploadType(uploadType); } @Override public BulkInsert setUploadProtocol(java.lang.String uploadProtocol) { return (BulkInsert) super.setUploadProtocol(uploadProtocol); } @Override public BulkInsert setUserIp(java.lang.String userIp) { return (BulkInsert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public BulkInsert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public BulkInsert setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public BulkInsert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public BulkInsert set(String parameterName, Object value) { return (BulkInsert) super.set(parameterName, value); } } /** * Deletes the specified Instance resource. For more information, see Deleting an instance. * * Create a request for the method "instances.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String zone, java.lang.String instance) throws java.io.IOException { Delete result = new Delete(project, zone, instance); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified Instance resource. For more information, see Deleting an instance. * * Create a request for the method "instances.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String zone, java.lang.String instance) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Delete setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance resource to delete. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance resource to delete. */ public java.lang.String getInstance() { return instance; } /** Name of the instance resource to delete. */ public Delete setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Deletes an access config from an instance's network interface. * * Create a request for the method "instances.deleteAccessConfig". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link DeleteAccessConfig#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param accessConfig The name of the access config to delete. * @param networkInterface The name of the network interface. * @return the request */ public DeleteAccessConfig deleteAccessConfig(java.lang.String project, java.lang.String zone, java.lang.String instance, java.lang.String accessConfig, java.lang.String networkInterface) throws java.io.IOException { DeleteAccessConfig result = new DeleteAccessConfig(project, zone, instance, accessConfig, networkInterface); initialize(result); return result; } public class DeleteAccessConfig extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes an access config from an instance's network interface. * * Create a request for the method "instances.deleteAccessConfig". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link DeleteAccessConfig#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param accessConfig The name of the access config to delete. * @param networkInterface The name of the network interface. * @since 1.13 */ protected DeleteAccessConfig(java.lang.String project, java.lang.String zone, java.lang.String instance, java.lang.String accessConfig, java.lang.String networkInterface) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.accessConfig = com.google.api.client.util.Preconditions.checkNotNull(accessConfig, "Required parameter accessConfig must be specified."); this.networkInterface = com.google.api.client.util.Preconditions.checkNotNull(networkInterface, "Required parameter networkInterface must be specified."); } @Override public DeleteAccessConfig set$Xgafv(java.lang.String $Xgafv) { return (DeleteAccessConfig) super.set$Xgafv($Xgafv); } @Override public DeleteAccessConfig setAccessToken(java.lang.String accessToken) { return (DeleteAccessConfig) super.setAccessToken(accessToken); } @Override public DeleteAccessConfig setAlt(java.lang.String alt) { return (DeleteAccessConfig) super.setAlt(alt); } @Override public DeleteAccessConfig setCallback(java.lang.String callback) { return (DeleteAccessConfig) super.setCallback(callback); } @Override public DeleteAccessConfig setFields(java.lang.String fields) { return (DeleteAccessConfig) super.setFields(fields); } @Override public DeleteAccessConfig setKey(java.lang.String key) { return (DeleteAccessConfig) super.setKey(key); } @Override public DeleteAccessConfig setOauthToken(java.lang.String oauthToken) { return (DeleteAccessConfig) super.setOauthToken(oauthToken); } @Override public DeleteAccessConfig setPrettyPrint(java.lang.Boolean prettyPrint) { return (DeleteAccessConfig) super.setPrettyPrint(prettyPrint); } @Override public DeleteAccessConfig setQuotaUser(java.lang.String quotaUser) { return (DeleteAccessConfig) super.setQuotaUser(quotaUser); } @Override public DeleteAccessConfig setUploadType(java.lang.String uploadType) { return (DeleteAccessConfig) super.setUploadType(uploadType); } @Override public DeleteAccessConfig setUploadProtocol(java.lang.String uploadProtocol) { return (DeleteAccessConfig) super.setUploadProtocol(uploadProtocol); } @Override public DeleteAccessConfig setUserIp(java.lang.String userIp) { return (DeleteAccessConfig) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public DeleteAccessConfig setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public DeleteAccessConfig setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The instance name for this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** The instance name for this request. */ public java.lang.String getInstance() { return instance; } /** The instance name for this request. */ public DeleteAccessConfig setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** The name of the access config to delete. */ @com.google.api.client.util.Key private java.lang.String accessConfig; /** The name of the access config to delete. */ public java.lang.String getAccessConfig() { return accessConfig; } /** The name of the access config to delete. */ public DeleteAccessConfig setAccessConfig(java.lang.String accessConfig) { this.accessConfig = accessConfig; return this; } /** The name of the network interface. */ @com.google.api.client.util.Key private java.lang.String networkInterface; /** The name of the network interface. */ public java.lang.String getNetworkInterface() { return networkInterface; } /** The name of the network interface. */ public DeleteAccessConfig setNetworkInterface(java.lang.String networkInterface) { this.networkInterface = networkInterface; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public DeleteAccessConfig setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public DeleteAccessConfig set(String parameterName, Object value) { return (DeleteAccessConfig) super.set(parameterName, value); } } /** * Detaches a disk from an instance. * * Create a request for the method "instances.detachDisk". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link DetachDisk#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Instance name for this request. * @param deviceName The device name of the disk to detach. Make a get() request on the instance to view currently * attached disks and device names. * @return the request */ public DetachDisk detachDisk(java.lang.String project, java.lang.String zone, java.lang.String instance, java.lang.String deviceName) throws java.io.IOException { DetachDisk result = new DetachDisk(project, zone, instance, deviceName); initialize(result); return result; } public class DetachDisk extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/detachDisk"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Detaches a disk from an instance. * * Create a request for the method "instances.detachDisk". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link DetachDisk#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Instance name for this request. * @param deviceName The device name of the disk to detach. Make a get() request on the instance to view currently * attached disks and device names. * @since 1.13 */ protected DetachDisk(java.lang.String project, java.lang.String zone, java.lang.String instance, java.lang.String deviceName) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.deviceName = com.google.api.client.util.Preconditions.checkNotNull(deviceName, "Required parameter deviceName must be specified."); } @Override public DetachDisk set$Xgafv(java.lang.String $Xgafv) { return (DetachDisk) super.set$Xgafv($Xgafv); } @Override public DetachDisk setAccessToken(java.lang.String accessToken) { return (DetachDisk) super.setAccessToken(accessToken); } @Override public DetachDisk setAlt(java.lang.String alt) { return (DetachDisk) super.setAlt(alt); } @Override public DetachDisk setCallback(java.lang.String callback) { return (DetachDisk) super.setCallback(callback); } @Override public DetachDisk setFields(java.lang.String fields) { return (DetachDisk) super.setFields(fields); } @Override public DetachDisk setKey(java.lang.String key) { return (DetachDisk) super.setKey(key); } @Override public DetachDisk setOauthToken(java.lang.String oauthToken) { return (DetachDisk) super.setOauthToken(oauthToken); } @Override public DetachDisk setPrettyPrint(java.lang.Boolean prettyPrint) { return (DetachDisk) super.setPrettyPrint(prettyPrint); } @Override public DetachDisk setQuotaUser(java.lang.String quotaUser) { return (DetachDisk) super.setQuotaUser(quotaUser); } @Override public DetachDisk setUploadType(java.lang.String uploadType) { return (DetachDisk) super.setUploadType(uploadType); } @Override public DetachDisk setUploadProtocol(java.lang.String uploadProtocol) { return (DetachDisk) super.setUploadProtocol(uploadProtocol); } @Override public DetachDisk setUserIp(java.lang.String userIp) { return (DetachDisk) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public DetachDisk setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public DetachDisk setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Instance name for this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Instance name for this request. */ public java.lang.String getInstance() { return instance; } /** Instance name for this request. */ public DetachDisk setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * The device name of the disk to detach. Make a get() request on the instance to view * currently attached disks and device names. */ @com.google.api.client.util.Key private java.lang.String deviceName; /** The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. */ public java.lang.String getDeviceName() { return deviceName; } /** * The device name of the disk to detach. Make a get() request on the instance to view * currently attached disks and device names. */ public DetachDisk setDeviceName(java.lang.String deviceName) { this.deviceName = deviceName; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public DetachDisk setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public DetachDisk set(String parameterName, Object value) { return (DetachDisk) super.set(parameterName, value); } } /** * Returns the specified Instance resource. * * Create a request for the method "instances.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String instance) throws java.io.IOException { Get result = new Get(project, zone, instance); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified Instance resource. * * Create a request for the method "instances.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String instance) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Instance.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance resource to return. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance resource to return. */ public java.lang.String getInstance() { return instance; } /** Name of the instance resource to return. */ public Get setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Returns effective firewalls applied to an interface of the instance. * * Create a request for the method "instances.getEffectiveFirewalls". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetEffectiveFirewalls#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param networkInterface The name of the network interface to get the effective firewalls. * @return the request */ public GetEffectiveFirewalls getEffectiveFirewalls(java.lang.String project, java.lang.String zone, java.lang.String instance, java.lang.String networkInterface) throws java.io.IOException { GetEffectiveFirewalls result = new GetEffectiveFirewalls(project, zone, instance, networkInterface); initialize(result); return result; } public class GetEffectiveFirewalls extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Returns effective firewalls applied to an interface of the instance. * * Create a request for the method "instances.getEffectiveFirewalls". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetEffectiveFirewalls#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param networkInterface The name of the network interface to get the effective firewalls. * @since 1.13 */ protected GetEffectiveFirewalls(java.lang.String project, java.lang.String zone, java.lang.String instance, java.lang.String networkInterface) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstancesGetEffectiveFirewallsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.networkInterface = com.google.api.client.util.Preconditions.checkNotNull(networkInterface, "Required parameter networkInterface must be specified."); } @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 GetEffectiveFirewalls set$Xgafv(java.lang.String $Xgafv) { return (GetEffectiveFirewalls) super.set$Xgafv($Xgafv); } @Override public GetEffectiveFirewalls setAccessToken(java.lang.String accessToken) { return (GetEffectiveFirewalls) super.setAccessToken(accessToken); } @Override public GetEffectiveFirewalls setAlt(java.lang.String alt) { return (GetEffectiveFirewalls) super.setAlt(alt); } @Override public GetEffectiveFirewalls setCallback(java.lang.String callback) { return (GetEffectiveFirewalls) super.setCallback(callback); } @Override public GetEffectiveFirewalls setFields(java.lang.String fields) { return (GetEffectiveFirewalls) super.setFields(fields); } @Override public GetEffectiveFirewalls setKey(java.lang.String key) { return (GetEffectiveFirewalls) super.setKey(key); } @Override public GetEffectiveFirewalls setOauthToken(java.lang.String oauthToken) { return (GetEffectiveFirewalls) super.setOauthToken(oauthToken); } @Override public GetEffectiveFirewalls setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetEffectiveFirewalls) super.setPrettyPrint(prettyPrint); } @Override public GetEffectiveFirewalls setQuotaUser(java.lang.String quotaUser) { return (GetEffectiveFirewalls) super.setQuotaUser(quotaUser); } @Override public GetEffectiveFirewalls setUploadType(java.lang.String uploadType) { return (GetEffectiveFirewalls) super.setUploadType(uploadType); } @Override public GetEffectiveFirewalls setUploadProtocol(java.lang.String uploadProtocol) { return (GetEffectiveFirewalls) super.setUploadProtocol(uploadProtocol); } @Override public GetEffectiveFirewalls setUserIp(java.lang.String userIp) { return (GetEffectiveFirewalls) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetEffectiveFirewalls setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public GetEffectiveFirewalls setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name of the instance scoping this request. */ public GetEffectiveFirewalls setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = instance; return this; } /** The name of the network interface to get the effective firewalls. */ @com.google.api.client.util.Key private java.lang.String networkInterface; /** The name of the network interface to get the effective firewalls. */ public java.lang.String getNetworkInterface() { return networkInterface; } /** The name of the network interface to get the effective firewalls. */ public GetEffectiveFirewalls setNetworkInterface(java.lang.String networkInterface) { this.networkInterface = networkInterface; return this; } @Override public GetEffectiveFirewalls set(String parameterName, Object value) { return (GetEffectiveFirewalls) super.set(parameterName, value); } } /** * Returns the specified guest attributes entry. * * Create a request for the method "instances.getGuestAttributes". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetGuestAttributes#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @return the request */ public GetGuestAttributes getGuestAttributes(java.lang.String project, java.lang.String zone, java.lang.String instance) throws java.io.IOException { GetGuestAttributes result = new GetGuestAttributes(project, zone, instance); initialize(result); return result; } public class GetGuestAttributes extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified guest attributes entry. * * Create a request for the method "instances.getGuestAttributes". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @since 1.13 */ protected GetGuestAttributes(java.lang.String project, java.lang.String zone, java.lang.String instance) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.GuestAttributes.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 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); } @Override public GetGuestAttributes setUserIp(java.lang.String userIp) { return (GetGuestAttributes) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetGuestAttributes setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public GetGuestAttributes setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name of the instance scoping this request. */ public GetGuestAttributes setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** Specifies the guest attributes path to be queried. */ @com.google.api.client.util.Key private java.lang.String queryPath; /** Specifies the guest attributes path to be queried. */ public java.lang.String getQueryPath() { return queryPath; } /** Specifies the guest attributes path to be queried. */ public GetGuestAttributes setQueryPath(java.lang.String queryPath) { this.queryPath = queryPath; return this; } /** Specifies the key for the guest attributes entry. */ @com.google.api.client.util.Key private java.lang.String variableKey; /** Specifies the key for the guest attributes entry. */ public java.lang.String getVariableKey() { return variableKey; } /** Specifies the key for the guest attributes entry. */ public GetGuestAttributes setVariableKey(java.lang.String variableKey) { this.variableKey = variableKey; return this; } @Override public GetGuestAttributes set(String parameterName, Object value) { return (GetGuestAttributes) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "instances.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, zone, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "instances.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public GetIamPolicy setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Returns the screenshot from the specified instance. * * Create a request for the method "instances.getScreenshot". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetScreenshot#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @return the request */ public GetScreenshot getScreenshot(java.lang.String project, java.lang.String zone, java.lang.String instance) throws java.io.IOException { GetScreenshot result = new GetScreenshot(project, zone, instance); initialize(result); return result; } public class GetScreenshot extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/screenshot"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the screenshot from the specified instance. * * Create a request for the method "instances.getScreenshot". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetScreenshot#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @since 1.13 */ protected GetScreenshot(java.lang.String project, java.lang.String zone, java.lang.String instance) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Screenshot.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetScreenshot set$Xgafv(java.lang.String $Xgafv) { return (GetScreenshot) super.set$Xgafv($Xgafv); } @Override public GetScreenshot setAccessToken(java.lang.String accessToken) { return (GetScreenshot) super.setAccessToken(accessToken); } @Override public GetScreenshot setAlt(java.lang.String alt) { return (GetScreenshot) super.setAlt(alt); } @Override public GetScreenshot setCallback(java.lang.String callback) { return (GetScreenshot) super.setCallback(callback); } @Override public GetScreenshot setFields(java.lang.String fields) { return (GetScreenshot) super.setFields(fields); } @Override public GetScreenshot setKey(java.lang.String key) { return (GetScreenshot) super.setKey(key); } @Override public GetScreenshot setOauthToken(java.lang.String oauthToken) { return (GetScreenshot) super.setOauthToken(oauthToken); } @Override public GetScreenshot setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetScreenshot) super.setPrettyPrint(prettyPrint); } @Override public GetScreenshot setQuotaUser(java.lang.String quotaUser) { return (GetScreenshot) super.setQuotaUser(quotaUser); } @Override public GetScreenshot setUploadType(java.lang.String uploadType) { return (GetScreenshot) super.setUploadType(uploadType); } @Override public GetScreenshot setUploadProtocol(java.lang.String uploadProtocol) { return (GetScreenshot) super.setUploadProtocol(uploadProtocol); } @Override public GetScreenshot setUserIp(java.lang.String userIp) { return (GetScreenshot) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetScreenshot setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public GetScreenshot setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name of the instance scoping this request. */ public GetScreenshot setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } @Override public GetScreenshot set(String parameterName, Object value) { return (GetScreenshot) super.set(parameterName, value); } } /** * Returns the last 1 MB of serial port output from the specified instance. * * Create a request for the method "instances.getSerialPortOutput". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetSerialPortOutput#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance for this request. * @return the request */ public GetSerialPortOutput getSerialPortOutput(java.lang.String project, java.lang.String zone, java.lang.String instance) throws java.io.IOException { GetSerialPortOutput result = new GetSerialPortOutput(project, zone, instance); initialize(result); return result; } public class GetSerialPortOutput extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/serialPort"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the last 1 MB of serial port output from the specified instance. * * Create a request for the method "instances.getSerialPortOutput". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetSerialPortOutput#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance for this request. * @since 1.13 */ protected GetSerialPortOutput(java.lang.String project, java.lang.String zone, java.lang.String instance) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SerialPortOutput.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetSerialPortOutput set$Xgafv(java.lang.String $Xgafv) { return (GetSerialPortOutput) super.set$Xgafv($Xgafv); } @Override public GetSerialPortOutput setAccessToken(java.lang.String accessToken) { return (GetSerialPortOutput) super.setAccessToken(accessToken); } @Override public GetSerialPortOutput setAlt(java.lang.String alt) { return (GetSerialPortOutput) super.setAlt(alt); } @Override public GetSerialPortOutput setCallback(java.lang.String callback) { return (GetSerialPortOutput) super.setCallback(callback); } @Override public GetSerialPortOutput setFields(java.lang.String fields) { return (GetSerialPortOutput) super.setFields(fields); } @Override public GetSerialPortOutput setKey(java.lang.String key) { return (GetSerialPortOutput) super.setKey(key); } @Override public GetSerialPortOutput setOauthToken(java.lang.String oauthToken) { return (GetSerialPortOutput) super.setOauthToken(oauthToken); } @Override public GetSerialPortOutput setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetSerialPortOutput) super.setPrettyPrint(prettyPrint); } @Override public GetSerialPortOutput setQuotaUser(java.lang.String quotaUser) { return (GetSerialPortOutput) super.setQuotaUser(quotaUser); } @Override public GetSerialPortOutput setUploadType(java.lang.String uploadType) { return (GetSerialPortOutput) super.setUploadType(uploadType); } @Override public GetSerialPortOutput setUploadProtocol(java.lang.String uploadProtocol) { return (GetSerialPortOutput) super.setUploadProtocol(uploadProtocol); } @Override public GetSerialPortOutput setUserIp(java.lang.String userIp) { return (GetSerialPortOutput) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetSerialPortOutput setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public GetSerialPortOutput setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance for this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance for this request. */ public java.lang.String getInstance() { return instance; } /** Name of the instance for this request. */ public GetSerialPortOutput setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** Specifies which COM or serial port to retrieve data from. */ @com.google.api.client.util.Key private java.lang.Integer port; /** Specifies which COM or serial port to retrieve data from. [default: 1] [minimum: 1] [maximum: 4] */ public java.lang.Integer getPort() { return port; } /** Specifies which COM or serial port to retrieve data from. */ public GetSerialPortOutput setPort(java.lang.Integer port) { this.port = port; return this; } /** * Specifies the starting byte position of the output to return. To start with the first byte * of output to the specified port, omit this field or set it to `0`. If the output for that * byte position is available, this field matches the `start` parameter sent with the request. * If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest * output is discarded and is no longer available. If the requested start position refers to * discarded output, the start position is adjusted to the oldest output still available, and * the adjusted start position is returned as the `start` property value. You can also provide * a negative start position, which translates to the most recent number of bytes written to * the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the * serial console. */ @com.google.api.client.util.Key private java.lang.Long start; /** Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console. */ public java.lang.Long getStart() { return start; } /** * Specifies the starting byte position of the output to return. To start with the first byte * of output to the specified port, omit this field or set it to `0`. If the output for that * byte position is available, this field matches the `start` parameter sent with the request. * If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest * output is discarded and is no longer available. If the requested start position refers to * discarded output, the start position is adjusted to the oldest output still available, and * the adjusted start position is returned as the `start` property value. You can also provide * a negative start position, which translates to the most recent number of bytes written to * the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the * serial console. */ public GetSerialPortOutput setStart(java.lang.Long start) { this.start = start; return this; } @Override public GetSerialPortOutput set(String parameterName, Object value) { return (GetSerialPortOutput) super.set(parameterName, value); } } /** * Returns the Shielded Instance Identity of an instance * * Create a request for the method "instances.getShieldedInstanceIdentity". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetShieldedInstanceIdentity#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name or id of the instance scoping this request. * @return the request */ public GetShieldedInstanceIdentity getShieldedInstanceIdentity(java.lang.String project, java.lang.String zone, java.lang.String instance) throws java.io.IOException { GetShieldedInstanceIdentity result = new GetShieldedInstanceIdentity(project, zone, instance); initialize(result); return result; } public class GetShieldedInstanceIdentity extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the Shielded Instance Identity of an instance * * Create a request for the method "instances.getShieldedInstanceIdentity". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetShieldedInstanceIdentity#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name or id of the instance scoping this request. * @since 1.13 */ protected GetShieldedInstanceIdentity(java.lang.String project, java.lang.String zone, java.lang.String instance) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ShieldedInstanceIdentity.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetShieldedInstanceIdentity set$Xgafv(java.lang.String $Xgafv) { return (GetShieldedInstanceIdentity) super.set$Xgafv($Xgafv); } @Override public GetShieldedInstanceIdentity setAccessToken(java.lang.String accessToken) { return (GetShieldedInstanceIdentity) super.setAccessToken(accessToken); } @Override public GetShieldedInstanceIdentity setAlt(java.lang.String alt) { return (GetShieldedInstanceIdentity) super.setAlt(alt); } @Override public GetShieldedInstanceIdentity setCallback(java.lang.String callback) { return (GetShieldedInstanceIdentity) super.setCallback(callback); } @Override public GetShieldedInstanceIdentity setFields(java.lang.String fields) { return (GetShieldedInstanceIdentity) super.setFields(fields); } @Override public GetShieldedInstanceIdentity setKey(java.lang.String key) { return (GetShieldedInstanceIdentity) super.setKey(key); } @Override public GetShieldedInstanceIdentity setOauthToken(java.lang.String oauthToken) { return (GetShieldedInstanceIdentity) super.setOauthToken(oauthToken); } @Override public GetShieldedInstanceIdentity setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetShieldedInstanceIdentity) super.setPrettyPrint(prettyPrint); } @Override public GetShieldedInstanceIdentity setQuotaUser(java.lang.String quotaUser) { return (GetShieldedInstanceIdentity) super.setQuotaUser(quotaUser); } @Override public GetShieldedInstanceIdentity setUploadType(java.lang.String uploadType) { return (GetShieldedInstanceIdentity) super.setUploadType(uploadType); } @Override public GetShieldedInstanceIdentity setUploadProtocol(java.lang.String uploadProtocol) { return (GetShieldedInstanceIdentity) super.setUploadProtocol(uploadProtocol); } @Override public GetShieldedInstanceIdentity setUserIp(java.lang.String userIp) { return (GetShieldedInstanceIdentity) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetShieldedInstanceIdentity setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public GetShieldedInstanceIdentity setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name or id of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name or id of the instance scoping this request. */ public GetShieldedInstanceIdentity setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } @Override public GetShieldedInstanceIdentity set(String parameterName, Object value) { return (GetShieldedInstanceIdentity) super.set(parameterName, value); } } /** * Creates an instance resource in the specified project using the data included in the request. * * Create a request for the method "instances.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.Instance} * @return the request */ public Insert insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.Instance content) throws java.io.IOException { Insert result = new Insert(project, zone, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates an instance resource in the specified project using the data included in the request. * * Create a request for the method "instances.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.Instance} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.Instance content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Insert setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** * Specifies instance template to create the instance. This field is optional. It can be a * full or partial URL. For example, the following are all valid URLs to an instance template: * - https://www.googleapis.com/compute/v1/projects/project * /global/instanceTemplates/instanceTemplate - * projects/project/global/instanceTemplates/instanceTemplate - * global/instanceTemplates/instanceTemplate */ @com.google.api.client.util.Key private java.lang.String sourceInstanceTemplate; /** Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project /global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate */ public java.lang.String getSourceInstanceTemplate() { return sourceInstanceTemplate; } /** * Specifies instance template to create the instance. This field is optional. It can be a * full or partial URL. For example, the following are all valid URLs to an instance template: * - https://www.googleapis.com/compute/v1/projects/project * /global/instanceTemplates/instanceTemplate - * projects/project/global/instanceTemplates/instanceTemplate - * global/instanceTemplates/instanceTemplate */ public Insert setSourceInstanceTemplate(java.lang.String sourceInstanceTemplate) { this.sourceInstanceTemplate = sourceInstanceTemplate; return this; } /** * Specifies the machine image to use to create the instance. This field is optional. It can * be a full or partial URL. For example, the following are all valid URLs to a machine image: * - https://www.googleapis.com/compute/v1/projects/project/global/global * /machineImages/machineImage - projects/project/global/global/machineImages/machineImage - * global/machineImages/machineImage */ @com.google.api.client.util.Key private java.lang.String sourceMachineImage; /** Specifies the machine image to use to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to a machine image: - https://www.googleapis.com/compute/v1/projects/project/global/global /machineImages/machineImage - projects/project/global/global/machineImages/machineImage - global/machineImages/machineImage */ public java.lang.String getSourceMachineImage() { return sourceMachineImage; } /** * Specifies the machine image to use to create the instance. This field is optional. It can * be a full or partial URL. For example, the following are all valid URLs to a machine image: * - https://www.googleapis.com/compute/v1/projects/project/global/global * /machineImages/machineImage - projects/project/global/global/machineImages/machineImage - * global/machineImages/machineImage */ public Insert setSourceMachineImage(java.lang.String sourceMachineImage) { this.sourceMachineImage = sourceMachineImage; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of instances contained within the specified zone. * * Create a request for the method "instances.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves the list of instances contained within the specified zone. * * Create a request for the method "instances.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public List setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Retrieves a list of resources that refer to the VM instance specified in the request. For * example, if the VM instance is part of a managed or unmanaged instance group, the referrers list * includes the instance group. For more information, read Viewing referrers to VM instances. * * Create a request for the method "instances.listReferrers". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListReferrers#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the target instance scoping this request, or '-' if the request should span over all * instances in the container. * @return the request */ public ListReferrers listReferrers(java.lang.String project, java.lang.String zone, java.lang.String instance) throws java.io.IOException { ListReferrers result = new ListReferrers(project, zone, instance); initialize(result); return result; } public class ListReferrers extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/referrers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Retrieves a list of resources that refer to the VM instance specified in the request. For * example, if the VM instance is part of a managed or unmanaged instance group, the referrers * list includes the instance group. For more information, read Viewing referrers to VM instances. * * Create a request for the method "instances.listReferrers". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListReferrers#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the target instance scoping this request, or '-' if the request should span over all * instances in the container. * @since 1.13 */ protected ListReferrers(java.lang.String project, java.lang.String zone, java.lang.String instance) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceListReferrers.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 ListReferrers set$Xgafv(java.lang.String $Xgafv) { return (ListReferrers) super.set$Xgafv($Xgafv); } @Override public ListReferrers setAccessToken(java.lang.String accessToken) { return (ListReferrers) super.setAccessToken(accessToken); } @Override public ListReferrers setAlt(java.lang.String alt) { return (ListReferrers) super.setAlt(alt); } @Override public ListReferrers setCallback(java.lang.String callback) { return (ListReferrers) super.setCallback(callback); } @Override public ListReferrers setFields(java.lang.String fields) { return (ListReferrers) super.setFields(fields); } @Override public ListReferrers setKey(java.lang.String key) { return (ListReferrers) super.setKey(key); } @Override public ListReferrers setOauthToken(java.lang.String oauthToken) { return (ListReferrers) super.setOauthToken(oauthToken); } @Override public ListReferrers setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListReferrers) super.setPrettyPrint(prettyPrint); } @Override public ListReferrers setQuotaUser(java.lang.String quotaUser) { return (ListReferrers) super.setQuotaUser(quotaUser); } @Override public ListReferrers setUploadType(java.lang.String uploadType) { return (ListReferrers) super.setUploadType(uploadType); } @Override public ListReferrers setUploadProtocol(java.lang.String uploadProtocol) { return (ListReferrers) super.setUploadProtocol(uploadProtocol); } @Override public ListReferrers setUserIp(java.lang.String userIp) { return (ListReferrers) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListReferrers setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public ListReferrers setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * Name of the target instance scoping this request, or '-' if the request should span over * all instances in the container. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the target instance scoping this request, or '-' if the request should span over all instances in the container. */ public java.lang.String getInstance() { return instance; } /** * Name of the target instance scoping this request, or '-' if the request should span over * all instances in the container. */ public ListReferrers setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListReferrers setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListReferrers setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListReferrers setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListReferrers setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListReferrers setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListReferrers set(String parameterName, Object value) { return (ListReferrers) super.set(parameterName, value); } } /** * Perform a manual maintenance on the instance. * * Create a request for the method "instances.performMaintenance". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link PerformMaintenance#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @return the request */ public PerformMaintenance performMaintenance(java.lang.String project, java.lang.String zone, java.lang.String instance) throws java.io.IOException { PerformMaintenance result = new PerformMaintenance(project, zone, instance); initialize(result); return result; } public class PerformMaintenance extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/performMaintenance"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Perform a manual maintenance on the instance. * * Create a request for the method "instances.performMaintenance". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link PerformMaintenance#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @since 1.13 */ protected PerformMaintenance(java.lang.String project, java.lang.String zone, java.lang.String instance) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public PerformMaintenance set$Xgafv(java.lang.String $Xgafv) { return (PerformMaintenance) super.set$Xgafv($Xgafv); } @Override public PerformMaintenance setAccessToken(java.lang.String accessToken) { return (PerformMaintenance) super.setAccessToken(accessToken); } @Override public PerformMaintenance setAlt(java.lang.String alt) { return (PerformMaintenance) super.setAlt(alt); } @Override public PerformMaintenance setCallback(java.lang.String callback) { return (PerformMaintenance) super.setCallback(callback); } @Override public PerformMaintenance setFields(java.lang.String fields) { return (PerformMaintenance) super.setFields(fields); } @Override public PerformMaintenance setKey(java.lang.String key) { return (PerformMaintenance) super.setKey(key); } @Override public PerformMaintenance setOauthToken(java.lang.String oauthToken) { return (PerformMaintenance) super.setOauthToken(oauthToken); } @Override public PerformMaintenance setPrettyPrint(java.lang.Boolean prettyPrint) { return (PerformMaintenance) super.setPrettyPrint(prettyPrint); } @Override public PerformMaintenance setQuotaUser(java.lang.String quotaUser) { return (PerformMaintenance) super.setQuotaUser(quotaUser); } @Override public PerformMaintenance setUploadType(java.lang.String uploadType) { return (PerformMaintenance) super.setUploadType(uploadType); } @Override public PerformMaintenance setUploadProtocol(java.lang.String uploadProtocol) { return (PerformMaintenance) super.setUploadProtocol(uploadProtocol); } @Override public PerformMaintenance setUserIp(java.lang.String userIp) { return (PerformMaintenance) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public PerformMaintenance setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public PerformMaintenance setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name of the instance scoping this request. */ public PerformMaintenance setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public PerformMaintenance setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public PerformMaintenance set(String parameterName, Object value) { return (PerformMaintenance) super.set(parameterName, value); } } /** * Removes resource policies from an instance. * * Create a request for the method "instances.removeResourcePolicies". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RemoveResourcePolicies#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param content the {@link com.google.api.services.compute.model.InstancesRemoveResourcePoliciesRequest} * @return the request */ public RemoveResourcePolicies removeResourcePolicies(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesRemoveResourcePoliciesRequest content) throws java.io.IOException { RemoveResourcePolicies result = new RemoveResourcePolicies(project, zone, instance, content); initialize(result); return result; } public class RemoveResourcePolicies extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Removes resource policies from an instance. * * Create a request for the method "instances.removeResourcePolicies". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RemoveResourcePolicies#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param content the {@link com.google.api.services.compute.model.InstancesRemoveResourcePoliciesRequest} * @since 1.13 */ protected RemoveResourcePolicies(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesRemoveResourcePoliciesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public RemoveResourcePolicies set$Xgafv(java.lang.String $Xgafv) { return (RemoveResourcePolicies) super.set$Xgafv($Xgafv); } @Override public RemoveResourcePolicies setAccessToken(java.lang.String accessToken) { return (RemoveResourcePolicies) super.setAccessToken(accessToken); } @Override public RemoveResourcePolicies setAlt(java.lang.String alt) { return (RemoveResourcePolicies) super.setAlt(alt); } @Override public RemoveResourcePolicies setCallback(java.lang.String callback) { return (RemoveResourcePolicies) super.setCallback(callback); } @Override public RemoveResourcePolicies setFields(java.lang.String fields) { return (RemoveResourcePolicies) super.setFields(fields); } @Override public RemoveResourcePolicies setKey(java.lang.String key) { return (RemoveResourcePolicies) super.setKey(key); } @Override public RemoveResourcePolicies setOauthToken(java.lang.String oauthToken) { return (RemoveResourcePolicies) super.setOauthToken(oauthToken); } @Override public RemoveResourcePolicies setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveResourcePolicies) super.setPrettyPrint(prettyPrint); } @Override public RemoveResourcePolicies setQuotaUser(java.lang.String quotaUser) { return (RemoveResourcePolicies) super.setQuotaUser(quotaUser); } @Override public RemoveResourcePolicies setUploadType(java.lang.String uploadType) { return (RemoveResourcePolicies) super.setUploadType(uploadType); } @Override public RemoveResourcePolicies setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveResourcePolicies) super.setUploadProtocol(uploadProtocol); } @Override public RemoveResourcePolicies setUserIp(java.lang.String userIp) { return (RemoveResourcePolicies) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public RemoveResourcePolicies setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public RemoveResourcePolicies setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The instance name for this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** The instance name for this request. */ public java.lang.String getInstance() { return instance; } /** The instance name for this request. */ public RemoveResourcePolicies setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public RemoveResourcePolicies setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public RemoveResourcePolicies set(String parameterName, Object value) { return (RemoveResourcePolicies) super.set(parameterName, value); } } /** * Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. * For more information, see Resetting an instance. * * Create a request for the method "instances.reset". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Reset#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @return the request */ public Reset reset(java.lang.String project, java.lang.String zone, java.lang.String instance) throws java.io.IOException { Reset result = new Reset(project, zone, instance); initialize(result); return result; } public class Reset extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/reset"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. * For more information, see Resetting an instance. * * Create a request for the method "instances.reset". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @since 1.13 */ protected Reset(java.lang.String project, java.lang.String zone, java.lang.String instance) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Reset setUserIp(java.lang.String userIp) { return (Reset) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Reset setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Reset setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name of the instance scoping this request. */ public Reset setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Reset setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Reset set(String parameterName, Object value) { return (Reset) super.set(parameterName, value); } } /** * Resumes an instance that was suspended using the instances().suspend method. * * Create a request for the method "instances.resume". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Resume#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to resume. * @return the request */ public Resume resume(java.lang.String project, java.lang.String zone, java.lang.String instance) throws java.io.IOException { Resume result = new Resume(project, zone, instance); initialize(result); return result; } public class Resume extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/resume"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Resumes an instance that was suspended using the instances().suspend method. * * Create a request for the method "instances.resume". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Resume#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to resume. * @since 1.13 */ protected Resume(java.lang.String project, java.lang.String zone, java.lang.String instance) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Resume set$Xgafv(java.lang.String $Xgafv) { return (Resume) super.set$Xgafv($Xgafv); } @Override public Resume setAccessToken(java.lang.String accessToken) { return (Resume) super.setAccessToken(accessToken); } @Override public Resume setAlt(java.lang.String alt) { return (Resume) super.setAlt(alt); } @Override public Resume setCallback(java.lang.String callback) { return (Resume) super.setCallback(callback); } @Override public Resume setFields(java.lang.String fields) { return (Resume) super.setFields(fields); } @Override public Resume setKey(java.lang.String key) { return (Resume) super.setKey(key); } @Override public Resume setOauthToken(java.lang.String oauthToken) { return (Resume) super.setOauthToken(oauthToken); } @Override public Resume setPrettyPrint(java.lang.Boolean prettyPrint) { return (Resume) super.setPrettyPrint(prettyPrint); } @Override public Resume setQuotaUser(java.lang.String quotaUser) { return (Resume) super.setQuotaUser(quotaUser); } @Override public Resume setUploadType(java.lang.String uploadType) { return (Resume) super.setUploadType(uploadType); } @Override public Resume setUploadProtocol(java.lang.String uploadProtocol) { return (Resume) super.setUploadProtocol(uploadProtocol); } @Override public Resume setUserIp(java.lang.String userIp) { return (Resume) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Resume setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Resume setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance resource to resume. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance resource to resume. */ public java.lang.String getInstance() { return instance; } /** Name of the instance resource to resume. */ public Resume setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Resume setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Resume set(String parameterName, Object value) { return (Resume) super.set(parameterName, value); } } /** * Sends diagnostic interrupt to the instance. * * Create a request for the method "instances.sendDiagnosticInterrupt". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SendDiagnosticInterrupt#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @return the request */ public SendDiagnosticInterrupt sendDiagnosticInterrupt(java.lang.String project, java.lang.String zone, java.lang.String instance) throws java.io.IOException { SendDiagnosticInterrupt result = new SendDiagnosticInterrupt(project, zone, instance); initialize(result); return result; } public class SendDiagnosticInterrupt extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sends diagnostic interrupt to the instance. * * Create a request for the method "instances.sendDiagnosticInterrupt". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SendDiagnosticInterrupt#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @since 1.13 */ protected SendDiagnosticInterrupt(java.lang.String project, java.lang.String zone, java.lang.String instance) { super(Compute.this, "POST", REST_PATH, null, Void.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SendDiagnosticInterrupt set$Xgafv(java.lang.String $Xgafv) { return (SendDiagnosticInterrupt) super.set$Xgafv($Xgafv); } @Override public SendDiagnosticInterrupt setAccessToken(java.lang.String accessToken) { return (SendDiagnosticInterrupt) super.setAccessToken(accessToken); } @Override public SendDiagnosticInterrupt setAlt(java.lang.String alt) { return (SendDiagnosticInterrupt) super.setAlt(alt); } @Override public SendDiagnosticInterrupt setCallback(java.lang.String callback) { return (SendDiagnosticInterrupt) super.setCallback(callback); } @Override public SendDiagnosticInterrupt setFields(java.lang.String fields) { return (SendDiagnosticInterrupt) super.setFields(fields); } @Override public SendDiagnosticInterrupt setKey(java.lang.String key) { return (SendDiagnosticInterrupt) super.setKey(key); } @Override public SendDiagnosticInterrupt setOauthToken(java.lang.String oauthToken) { return (SendDiagnosticInterrupt) super.setOauthToken(oauthToken); } @Override public SendDiagnosticInterrupt setPrettyPrint(java.lang.Boolean prettyPrint) { return (SendDiagnosticInterrupt) super.setPrettyPrint(prettyPrint); } @Override public SendDiagnosticInterrupt setQuotaUser(java.lang.String quotaUser) { return (SendDiagnosticInterrupt) super.setQuotaUser(quotaUser); } @Override public SendDiagnosticInterrupt setUploadType(java.lang.String uploadType) { return (SendDiagnosticInterrupt) super.setUploadType(uploadType); } @Override public SendDiagnosticInterrupt setUploadProtocol(java.lang.String uploadProtocol) { return (SendDiagnosticInterrupt) super.setUploadProtocol(uploadProtocol); } @Override public SendDiagnosticInterrupt setUserIp(java.lang.String userIp) { return (SendDiagnosticInterrupt) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SendDiagnosticInterrupt setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SendDiagnosticInterrupt setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name of the instance scoping this request. */ public SendDiagnosticInterrupt setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } @Override public SendDiagnosticInterrupt set(String parameterName, Object value) { return (SendDiagnosticInterrupt) super.set(parameterName, value); } } /** * Sets deletion protection on the instance. * * Create a request for the method "instances.setDeletionProtection". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetDeletionProtection#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @return the request */ public SetDeletionProtection setDeletionProtection(java.lang.String project, java.lang.String zone, java.lang.String resource) throws java.io.IOException { SetDeletionProtection result = new SetDeletionProtection(project, zone, resource); initialize(result); return result; } public class SetDeletionProtection extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets deletion protection on the instance. * * Create a request for the method "instances.setDeletionProtection". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetDeletionProtection#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected SetDeletionProtection(java.lang.String project, java.lang.String zone, java.lang.String resource) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetDeletionProtection set$Xgafv(java.lang.String $Xgafv) { return (SetDeletionProtection) super.set$Xgafv($Xgafv); } @Override public SetDeletionProtection setAccessToken(java.lang.String accessToken) { return (SetDeletionProtection) super.setAccessToken(accessToken); } @Override public SetDeletionProtection setAlt(java.lang.String alt) { return (SetDeletionProtection) super.setAlt(alt); } @Override public SetDeletionProtection setCallback(java.lang.String callback) { return (SetDeletionProtection) super.setCallback(callback); } @Override public SetDeletionProtection setFields(java.lang.String fields) { return (SetDeletionProtection) super.setFields(fields); } @Override public SetDeletionProtection setKey(java.lang.String key) { return (SetDeletionProtection) super.setKey(key); } @Override public SetDeletionProtection setOauthToken(java.lang.String oauthToken) { return (SetDeletionProtection) super.setOauthToken(oauthToken); } @Override public SetDeletionProtection setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetDeletionProtection) super.setPrettyPrint(prettyPrint); } @Override public SetDeletionProtection setQuotaUser(java.lang.String quotaUser) { return (SetDeletionProtection) super.setQuotaUser(quotaUser); } @Override public SetDeletionProtection setUploadType(java.lang.String uploadType) { return (SetDeletionProtection) super.setUploadType(uploadType); } @Override public SetDeletionProtection setUploadProtocol(java.lang.String uploadProtocol) { return (SetDeletionProtection) super.setUploadProtocol(uploadProtocol); } @Override public SetDeletionProtection setUserIp(java.lang.String userIp) { return (SetDeletionProtection) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetDeletionProtection setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetDeletionProtection setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetDeletionProtection setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Whether the resource should be protected against deletion. */ @com.google.api.client.util.Key private java.lang.Boolean deletionProtection; /** Whether the resource should be protected against deletion. [default: true] */ public java.lang.Boolean getDeletionProtection() { return deletionProtection; } /** Whether the resource should be protected against deletion. */ public SetDeletionProtection setDeletionProtection(java.lang.Boolean deletionProtection) { this.deletionProtection = deletionProtection; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the resource should be protected against deletion. *

*/ public boolean isDeletionProtection() { if (deletionProtection == null || deletionProtection == com.google.api.client.util.Data.NULL_BOOLEAN) { return true; } return deletionProtection; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetDeletionProtection setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetDeletionProtection set(String parameterName, Object value) { return (SetDeletionProtection) super.set(parameterName, value); } } /** * Sets the auto-delete flag for a disk attached to an instance. * * Create a request for the method "instances.setDiskAutoDelete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetDiskAutoDelete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param autoDelete Whether to auto-delete the disk when the instance is deleted. * @param deviceName The device name of the disk to modify. Make a get() request on the instance to view currently * attached disks and device names. * @return the request */ public SetDiskAutoDelete setDiskAutoDelete(java.lang.String project, java.lang.String zone, java.lang.String instance, java.lang.Boolean autoDelete, java.lang.String deviceName) throws java.io.IOException { SetDiskAutoDelete result = new SetDiskAutoDelete(project, zone, instance, autoDelete, deviceName); initialize(result); return result; } public class SetDiskAutoDelete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); private final java.util.regex.Pattern DEVICE_NAME_PATTERN = java.util.regex.Pattern.compile("\\w[\\w.-]{0,254}"); /** * Sets the auto-delete flag for a disk attached to an instance. * * Create a request for the method "instances.setDiskAutoDelete". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetDiskAutoDelete#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param autoDelete Whether to auto-delete the disk when the instance is deleted. * @param deviceName The device name of the disk to modify. Make a get() request on the instance to view currently * attached disks and device names. * @since 1.13 */ protected SetDiskAutoDelete(java.lang.String project, java.lang.String zone, java.lang.String instance, java.lang.Boolean autoDelete, java.lang.String deviceName) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.autoDelete = com.google.api.client.util.Preconditions.checkNotNull(autoDelete, "Required parameter autoDelete must be specified."); this.deviceName = com.google.api.client.util.Preconditions.checkNotNull(deviceName, "Required parameter deviceName must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DEVICE_NAME_PATTERN.matcher(deviceName).matches(), "Parameter deviceName must conform to the pattern " + "\\w[\\w.-]{0,254}"); } } @Override public SetDiskAutoDelete set$Xgafv(java.lang.String $Xgafv) { return (SetDiskAutoDelete) super.set$Xgafv($Xgafv); } @Override public SetDiskAutoDelete setAccessToken(java.lang.String accessToken) { return (SetDiskAutoDelete) super.setAccessToken(accessToken); } @Override public SetDiskAutoDelete setAlt(java.lang.String alt) { return (SetDiskAutoDelete) super.setAlt(alt); } @Override public SetDiskAutoDelete setCallback(java.lang.String callback) { return (SetDiskAutoDelete) super.setCallback(callback); } @Override public SetDiskAutoDelete setFields(java.lang.String fields) { return (SetDiskAutoDelete) super.setFields(fields); } @Override public SetDiskAutoDelete setKey(java.lang.String key) { return (SetDiskAutoDelete) super.setKey(key); } @Override public SetDiskAutoDelete setOauthToken(java.lang.String oauthToken) { return (SetDiskAutoDelete) super.setOauthToken(oauthToken); } @Override public SetDiskAutoDelete setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetDiskAutoDelete) super.setPrettyPrint(prettyPrint); } @Override public SetDiskAutoDelete setQuotaUser(java.lang.String quotaUser) { return (SetDiskAutoDelete) super.setQuotaUser(quotaUser); } @Override public SetDiskAutoDelete setUploadType(java.lang.String uploadType) { return (SetDiskAutoDelete) super.setUploadType(uploadType); } @Override public SetDiskAutoDelete setUploadProtocol(java.lang.String uploadProtocol) { return (SetDiskAutoDelete) super.setUploadProtocol(uploadProtocol); } @Override public SetDiskAutoDelete setUserIp(java.lang.String userIp) { return (SetDiskAutoDelete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetDiskAutoDelete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetDiskAutoDelete setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The instance name for this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** The instance name for this request. */ public java.lang.String getInstance() { return instance; } /** The instance name for this request. */ public SetDiskAutoDelete setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** Whether to auto-delete the disk when the instance is deleted. */ @com.google.api.client.util.Key private java.lang.Boolean autoDelete; /** Whether to auto-delete the disk when the instance is deleted. */ public java.lang.Boolean getAutoDelete() { return autoDelete; } /** Whether to auto-delete the disk when the instance is deleted. */ public SetDiskAutoDelete setAutoDelete(java.lang.Boolean autoDelete) { this.autoDelete = autoDelete; return this; } /** * The device name of the disk to modify. Make a get() request on the instance to view * currently attached disks and device names. */ @com.google.api.client.util.Key private java.lang.String deviceName; /** The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names. */ public java.lang.String getDeviceName() { return deviceName; } /** * The device name of the disk to modify. Make a get() request on the instance to view * currently attached disks and device names. */ public SetDiskAutoDelete setDeviceName(java.lang.String deviceName) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DEVICE_NAME_PATTERN.matcher(deviceName).matches(), "Parameter deviceName must conform to the pattern " + "\\w[\\w.-]{0,254}"); } this.deviceName = deviceName; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetDiskAutoDelete setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetDiskAutoDelete set(String parameterName, Object value) { return (SetDiskAutoDelete) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "instances.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, zone, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "instances.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetIamPolicy setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Sets labels on an instance. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "instances.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.InstancesSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, zone, instance, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets labels on an instance. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "instances.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.InstancesSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetLabels setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name of the instance scoping this request. */ public SetLabels setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetLabels setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } /** * Changes the number and/or type of accelerator for a stopped instance to the values specified in * the request. * * Create a request for the method "instances.setMachineResources". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetMachineResources#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.InstancesSetMachineResourcesRequest} * @return the request */ public SetMachineResources setMachineResources(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesSetMachineResourcesRequest content) throws java.io.IOException { SetMachineResources result = new SetMachineResources(project, zone, instance, content); initialize(result); return result; } public class SetMachineResources extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/setMachineResources"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Changes the number and/or type of accelerator for a stopped instance to the values specified in * the request. * * Create a request for the method "instances.setMachineResources". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetMachineResources#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.InstancesSetMachineResourcesRequest} * @since 1.13 */ protected SetMachineResources(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesSetMachineResourcesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetMachineResources set$Xgafv(java.lang.String $Xgafv) { return (SetMachineResources) super.set$Xgafv($Xgafv); } @Override public SetMachineResources setAccessToken(java.lang.String accessToken) { return (SetMachineResources) super.setAccessToken(accessToken); } @Override public SetMachineResources setAlt(java.lang.String alt) { return (SetMachineResources) super.setAlt(alt); } @Override public SetMachineResources setCallback(java.lang.String callback) { return (SetMachineResources) super.setCallback(callback); } @Override public SetMachineResources setFields(java.lang.String fields) { return (SetMachineResources) super.setFields(fields); } @Override public SetMachineResources setKey(java.lang.String key) { return (SetMachineResources) super.setKey(key); } @Override public SetMachineResources setOauthToken(java.lang.String oauthToken) { return (SetMachineResources) super.setOauthToken(oauthToken); } @Override public SetMachineResources setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetMachineResources) super.setPrettyPrint(prettyPrint); } @Override public SetMachineResources setQuotaUser(java.lang.String quotaUser) { return (SetMachineResources) super.setQuotaUser(quotaUser); } @Override public SetMachineResources setUploadType(java.lang.String uploadType) { return (SetMachineResources) super.setUploadType(uploadType); } @Override public SetMachineResources setUploadProtocol(java.lang.String uploadProtocol) { return (SetMachineResources) super.setUploadProtocol(uploadProtocol); } @Override public SetMachineResources setUserIp(java.lang.String userIp) { return (SetMachineResources) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetMachineResources setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetMachineResources setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name of the instance scoping this request. */ public SetMachineResources setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetMachineResources setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetMachineResources set(String parameterName, Object value) { return (SetMachineResources) super.set(parameterName, value); } } /** * Changes the machine type for a stopped instance to the machine type specified in the request. * * Create a request for the method "instances.setMachineType". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetMachineType#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.InstancesSetMachineTypeRequest} * @return the request */ public SetMachineType setMachineType(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesSetMachineTypeRequest content) throws java.io.IOException { SetMachineType result = new SetMachineType(project, zone, instance, content); initialize(result); return result; } public class SetMachineType extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/setMachineType"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Changes the machine type for a stopped instance to the machine type specified in the request. * * Create a request for the method "instances.setMachineType". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetMachineType#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.InstancesSetMachineTypeRequest} * @since 1.13 */ protected SetMachineType(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesSetMachineTypeRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetMachineType set$Xgafv(java.lang.String $Xgafv) { return (SetMachineType) super.set$Xgafv($Xgafv); } @Override public SetMachineType setAccessToken(java.lang.String accessToken) { return (SetMachineType) super.setAccessToken(accessToken); } @Override public SetMachineType setAlt(java.lang.String alt) { return (SetMachineType) super.setAlt(alt); } @Override public SetMachineType setCallback(java.lang.String callback) { return (SetMachineType) super.setCallback(callback); } @Override public SetMachineType setFields(java.lang.String fields) { return (SetMachineType) super.setFields(fields); } @Override public SetMachineType setKey(java.lang.String key) { return (SetMachineType) super.setKey(key); } @Override public SetMachineType setOauthToken(java.lang.String oauthToken) { return (SetMachineType) super.setOauthToken(oauthToken); } @Override public SetMachineType setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetMachineType) super.setPrettyPrint(prettyPrint); } @Override public SetMachineType setQuotaUser(java.lang.String quotaUser) { return (SetMachineType) super.setQuotaUser(quotaUser); } @Override public SetMachineType setUploadType(java.lang.String uploadType) { return (SetMachineType) super.setUploadType(uploadType); } @Override public SetMachineType setUploadProtocol(java.lang.String uploadProtocol) { return (SetMachineType) super.setUploadProtocol(uploadProtocol); } @Override public SetMachineType setUserIp(java.lang.String userIp) { return (SetMachineType) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetMachineType setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetMachineType setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name of the instance scoping this request. */ public SetMachineType setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetMachineType setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetMachineType set(String parameterName, Object value) { return (SetMachineType) super.set(parameterName, value); } } /** * Sets metadata for the specified instance to the data included in the request. * * Create a request for the method "instances.setMetadata". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetMetadata#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.Metadata} * @return the request */ public SetMetadata setMetadata(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.Metadata content) throws java.io.IOException { SetMetadata result = new SetMetadata(project, zone, instance, content); initialize(result); return result; } public class SetMetadata extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/setMetadata"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets metadata for the specified instance to the data included in the request. * * Create a request for the method "instances.setMetadata". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetMetadata#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.Metadata} * @since 1.13 */ protected SetMetadata(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.Metadata content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetMetadata set$Xgafv(java.lang.String $Xgafv) { return (SetMetadata) super.set$Xgafv($Xgafv); } @Override public SetMetadata setAccessToken(java.lang.String accessToken) { return (SetMetadata) super.setAccessToken(accessToken); } @Override public SetMetadata setAlt(java.lang.String alt) { return (SetMetadata) super.setAlt(alt); } @Override public SetMetadata setCallback(java.lang.String callback) { return (SetMetadata) super.setCallback(callback); } @Override public SetMetadata setFields(java.lang.String fields) { return (SetMetadata) super.setFields(fields); } @Override public SetMetadata setKey(java.lang.String key) { return (SetMetadata) super.setKey(key); } @Override public SetMetadata setOauthToken(java.lang.String oauthToken) { return (SetMetadata) super.setOauthToken(oauthToken); } @Override public SetMetadata setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetMetadata) super.setPrettyPrint(prettyPrint); } @Override public SetMetadata setQuotaUser(java.lang.String quotaUser) { return (SetMetadata) super.setQuotaUser(quotaUser); } @Override public SetMetadata setUploadType(java.lang.String uploadType) { return (SetMetadata) super.setUploadType(uploadType); } @Override public SetMetadata setUploadProtocol(java.lang.String uploadProtocol) { return (SetMetadata) super.setUploadProtocol(uploadProtocol); } @Override public SetMetadata setUserIp(java.lang.String userIp) { return (SetMetadata) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetMetadata setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetMetadata setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name of the instance scoping this request. */ public SetMetadata setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetMetadata setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetMetadata set(String parameterName, Object value) { return (SetMetadata) super.set(parameterName, value); } } /** * Changes the minimum CPU platform that this instance should use. This method can only be called on * a stopped instance. For more information, read Specifying a Minimum CPU Platform. * * Create a request for the method "instances.setMinCpuPlatform". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetMinCpuPlatform#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.InstancesSetMinCpuPlatformRequest} * @return the request */ public SetMinCpuPlatform setMinCpuPlatform(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesSetMinCpuPlatformRequest content) throws java.io.IOException { SetMinCpuPlatform result = new SetMinCpuPlatform(project, zone, instance, content); initialize(result); return result; } public class SetMinCpuPlatform extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Changes the minimum CPU platform that this instance should use. This method can only be called * on a stopped instance. For more information, read Specifying a Minimum CPU Platform. * * Create a request for the method "instances.setMinCpuPlatform". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetMinCpuPlatform#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.InstancesSetMinCpuPlatformRequest} * @since 1.13 */ protected SetMinCpuPlatform(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesSetMinCpuPlatformRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetMinCpuPlatform set$Xgafv(java.lang.String $Xgafv) { return (SetMinCpuPlatform) super.set$Xgafv($Xgafv); } @Override public SetMinCpuPlatform setAccessToken(java.lang.String accessToken) { return (SetMinCpuPlatform) super.setAccessToken(accessToken); } @Override public SetMinCpuPlatform setAlt(java.lang.String alt) { return (SetMinCpuPlatform) super.setAlt(alt); } @Override public SetMinCpuPlatform setCallback(java.lang.String callback) { return (SetMinCpuPlatform) super.setCallback(callback); } @Override public SetMinCpuPlatform setFields(java.lang.String fields) { return (SetMinCpuPlatform) super.setFields(fields); } @Override public SetMinCpuPlatform setKey(java.lang.String key) { return (SetMinCpuPlatform) super.setKey(key); } @Override public SetMinCpuPlatform setOauthToken(java.lang.String oauthToken) { return (SetMinCpuPlatform) super.setOauthToken(oauthToken); } @Override public SetMinCpuPlatform setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetMinCpuPlatform) super.setPrettyPrint(prettyPrint); } @Override public SetMinCpuPlatform setQuotaUser(java.lang.String quotaUser) { return (SetMinCpuPlatform) super.setQuotaUser(quotaUser); } @Override public SetMinCpuPlatform setUploadType(java.lang.String uploadType) { return (SetMinCpuPlatform) super.setUploadType(uploadType); } @Override public SetMinCpuPlatform setUploadProtocol(java.lang.String uploadProtocol) { return (SetMinCpuPlatform) super.setUploadProtocol(uploadProtocol); } @Override public SetMinCpuPlatform setUserIp(java.lang.String userIp) { return (SetMinCpuPlatform) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetMinCpuPlatform setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetMinCpuPlatform setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name of the instance scoping this request. */ public SetMinCpuPlatform setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetMinCpuPlatform setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetMinCpuPlatform set(String parameterName, Object value) { return (SetMinCpuPlatform) super.set(parameterName, value); } } /** * Sets name of an instance. * * Create a request for the method "instances.setName". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetName#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param content the {@link com.google.api.services.compute.model.InstancesSetNameRequest} * @return the request */ public SetName setName(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesSetNameRequest content) throws java.io.IOException { SetName result = new SetName(project, zone, instance, content); initialize(result); return result; } public class SetName extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/setName"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets name of an instance. * * Create a request for the method "instances.setName". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetName#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param content the {@link com.google.api.services.compute.model.InstancesSetNameRequest} * @since 1.13 */ protected SetName(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesSetNameRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetName set$Xgafv(java.lang.String $Xgafv) { return (SetName) super.set$Xgafv($Xgafv); } @Override public SetName setAccessToken(java.lang.String accessToken) { return (SetName) super.setAccessToken(accessToken); } @Override public SetName setAlt(java.lang.String alt) { return (SetName) super.setAlt(alt); } @Override public SetName setCallback(java.lang.String callback) { return (SetName) super.setCallback(callback); } @Override public SetName setFields(java.lang.String fields) { return (SetName) super.setFields(fields); } @Override public SetName setKey(java.lang.String key) { return (SetName) super.setKey(key); } @Override public SetName setOauthToken(java.lang.String oauthToken) { return (SetName) super.setOauthToken(oauthToken); } @Override public SetName setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetName) super.setPrettyPrint(prettyPrint); } @Override public SetName setQuotaUser(java.lang.String quotaUser) { return (SetName) super.setQuotaUser(quotaUser); } @Override public SetName setUploadType(java.lang.String uploadType) { return (SetName) super.setUploadType(uploadType); } @Override public SetName setUploadProtocol(java.lang.String uploadProtocol) { return (SetName) super.setUploadProtocol(uploadProtocol); } @Override public SetName setUserIp(java.lang.String userIp) { return (SetName) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetName setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetName setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The instance name for this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** The instance name for this request. */ public java.lang.String getInstance() { return instance; } /** The instance name for this request. */ public SetName setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetName setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetName set(String parameterName, Object value) { return (SetName) super.set(parameterName, value); } } /** * Sets an instance's scheduling options. You can only call this method on a stopped instance, that * is, a VM instance that is in a `TERMINATED` state. See Instance Life Cycle for more information * on the possible instance states. For more information about setting scheduling options for a VM, * see Set VM host maintenance policy. * * Create a request for the method "instances.setScheduling". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetScheduling#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Instance name for this request. * @param content the {@link com.google.api.services.compute.model.Scheduling} * @return the request */ public SetScheduling setScheduling(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.Scheduling content) throws java.io.IOException { SetScheduling result = new SetScheduling(project, zone, instance, content); initialize(result); return result; } public class SetScheduling extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/setScheduling"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets an instance's scheduling options. You can only call this method on a stopped instance, * that is, a VM instance that is in a `TERMINATED` state. See Instance Life Cycle for more * information on the possible instance states. For more information about setting scheduling * options for a VM, see Set VM host maintenance policy. * * Create a request for the method "instances.setScheduling". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetScheduling#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Instance name for this request. * @param content the {@link com.google.api.services.compute.model.Scheduling} * @since 1.13 */ protected SetScheduling(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.Scheduling content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetScheduling set$Xgafv(java.lang.String $Xgafv) { return (SetScheduling) super.set$Xgafv($Xgafv); } @Override public SetScheduling setAccessToken(java.lang.String accessToken) { return (SetScheduling) super.setAccessToken(accessToken); } @Override public SetScheduling setAlt(java.lang.String alt) { return (SetScheduling) super.setAlt(alt); } @Override public SetScheduling setCallback(java.lang.String callback) { return (SetScheduling) super.setCallback(callback); } @Override public SetScheduling setFields(java.lang.String fields) { return (SetScheduling) super.setFields(fields); } @Override public SetScheduling setKey(java.lang.String key) { return (SetScheduling) super.setKey(key); } @Override public SetScheduling setOauthToken(java.lang.String oauthToken) { return (SetScheduling) super.setOauthToken(oauthToken); } @Override public SetScheduling setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetScheduling) super.setPrettyPrint(prettyPrint); } @Override public SetScheduling setQuotaUser(java.lang.String quotaUser) { return (SetScheduling) super.setQuotaUser(quotaUser); } @Override public SetScheduling setUploadType(java.lang.String uploadType) { return (SetScheduling) super.setUploadType(uploadType); } @Override public SetScheduling setUploadProtocol(java.lang.String uploadProtocol) { return (SetScheduling) super.setUploadProtocol(uploadProtocol); } @Override public SetScheduling setUserIp(java.lang.String userIp) { return (SetScheduling) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetScheduling setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetScheduling setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Instance name for this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Instance name for this request. */ public java.lang.String getInstance() { return instance; } /** Instance name for this request. */ public SetScheduling setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetScheduling setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetScheduling set(String parameterName, Object value) { return (SetScheduling) super.set(parameterName, value); } } /** * Sets the Google Cloud Armor security policy for the specified instance. For more information, see * Google Cloud Armor Overview * * Create a request for the method "instances.setSecurityPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetSecurityPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone scoping this request. * @param instance Name of the Instance resource to which the security policy should be set. The name should conform to * RFC1035. * @param content the {@link com.google.api.services.compute.model.InstancesSetSecurityPolicyRequest} * @return the request */ public SetSecurityPolicy setSecurityPolicy(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesSetSecurityPolicyRequest content) throws java.io.IOException { SetSecurityPolicy result = new SetSecurityPolicy(project, zone, instance, content); initialize(result); return result; } public class SetSecurityPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Sets the Google Cloud Armor security policy for the specified instance. For more information, * see Google Cloud Armor Overview * * Create a request for the method "instances.setSecurityPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetSecurityPolicy#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param zone Name of the zone scoping this request. * @param instance Name of the Instance resource to which the security policy should be set. The name should conform to * RFC1035. * @param content the {@link com.google.api.services.compute.model.InstancesSetSecurityPolicyRequest} * @since 1.13 */ protected SetSecurityPolicy(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesSetSecurityPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); } @Override public SetSecurityPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetSecurityPolicy) super.set$Xgafv($Xgafv); } @Override public SetSecurityPolicy setAccessToken(java.lang.String accessToken) { return (SetSecurityPolicy) super.setAccessToken(accessToken); } @Override public SetSecurityPolicy setAlt(java.lang.String alt) { return (SetSecurityPolicy) super.setAlt(alt); } @Override public SetSecurityPolicy setCallback(java.lang.String callback) { return (SetSecurityPolicy) super.setCallback(callback); } @Override public SetSecurityPolicy setFields(java.lang.String fields) { return (SetSecurityPolicy) super.setFields(fields); } @Override public SetSecurityPolicy setKey(java.lang.String key) { return (SetSecurityPolicy) super.setKey(key); } @Override public SetSecurityPolicy setOauthToken(java.lang.String oauthToken) { return (SetSecurityPolicy) super.setOauthToken(oauthToken); } @Override public SetSecurityPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetSecurityPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetSecurityPolicy setQuotaUser(java.lang.String quotaUser) { return (SetSecurityPolicy) super.setQuotaUser(quotaUser); } @Override public SetSecurityPolicy setUploadType(java.lang.String uploadType) { return (SetSecurityPolicy) super.setUploadType(uploadType); } @Override public SetSecurityPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetSecurityPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetSecurityPolicy setUserIp(java.lang.String userIp) { return (SetSecurityPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetSecurityPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone scoping this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone scoping this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone scoping this request. */ public SetSecurityPolicy setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * Name of the Instance resource to which the security policy should be set. The name should * conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the Instance resource to which the security policy should be set. The name should conform to RFC1035. */ public java.lang.String getInstance() { return instance; } /** * Name of the Instance resource to which the security policy should be set. The name should * conform to RFC1035. */ public SetSecurityPolicy setInstance(java.lang.String instance) { this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetSecurityPolicy setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetSecurityPolicy set(String parameterName, Object value) { return (SetSecurityPolicy) super.set(parameterName, value); } } /** * Sets the service account on the instance. For more information, read Changing the service account * and access scopes for an instance. * * Create a request for the method "instances.setServiceAccount". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetServiceAccount#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to start. * @param content the {@link com.google.api.services.compute.model.InstancesSetServiceAccountRequest} * @return the request */ public SetServiceAccount setServiceAccount(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesSetServiceAccountRequest content) throws java.io.IOException { SetServiceAccount result = new SetServiceAccount(project, zone, instance, content); initialize(result); return result; } public class SetServiceAccount extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the service account on the instance. For more information, read Changing the service * account and access scopes for an instance. * * Create a request for the method "instances.setServiceAccount". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetServiceAccount#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to start. * @param content the {@link com.google.api.services.compute.model.InstancesSetServiceAccountRequest} * @since 1.13 */ protected SetServiceAccount(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesSetServiceAccountRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetServiceAccount set$Xgafv(java.lang.String $Xgafv) { return (SetServiceAccount) super.set$Xgafv($Xgafv); } @Override public SetServiceAccount setAccessToken(java.lang.String accessToken) { return (SetServiceAccount) super.setAccessToken(accessToken); } @Override public SetServiceAccount setAlt(java.lang.String alt) { return (SetServiceAccount) super.setAlt(alt); } @Override public SetServiceAccount setCallback(java.lang.String callback) { return (SetServiceAccount) super.setCallback(callback); } @Override public SetServiceAccount setFields(java.lang.String fields) { return (SetServiceAccount) super.setFields(fields); } @Override public SetServiceAccount setKey(java.lang.String key) { return (SetServiceAccount) super.setKey(key); } @Override public SetServiceAccount setOauthToken(java.lang.String oauthToken) { return (SetServiceAccount) super.setOauthToken(oauthToken); } @Override public SetServiceAccount setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetServiceAccount) super.setPrettyPrint(prettyPrint); } @Override public SetServiceAccount setQuotaUser(java.lang.String quotaUser) { return (SetServiceAccount) super.setQuotaUser(quotaUser); } @Override public SetServiceAccount setUploadType(java.lang.String uploadType) { return (SetServiceAccount) super.setUploadType(uploadType); } @Override public SetServiceAccount setUploadProtocol(java.lang.String uploadProtocol) { return (SetServiceAccount) super.setUploadProtocol(uploadProtocol); } @Override public SetServiceAccount setUserIp(java.lang.String userIp) { return (SetServiceAccount) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetServiceAccount setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetServiceAccount setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance resource to start. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance resource to start. */ public java.lang.String getInstance() { return instance; } /** Name of the instance resource to start. */ public SetServiceAccount setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetServiceAccount setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetServiceAccount set(String parameterName, Object value) { return (SetServiceAccount) super.set(parameterName, value); } } /** * Sets the Shielded Instance integrity policy for an instance. You can only use this method on a * running instance. This method supports PATCH semantics and uses the JSON merge patch format and * processing rules. * * Create a request for the method "instances.setShieldedInstanceIntegrityPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetShieldedInstanceIntegrityPolicy#execute()} method to invoke the * remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name or id of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.ShieldedInstanceIntegrityPolicy} * @return the request */ public SetShieldedInstanceIntegrityPolicy setShieldedInstanceIntegrityPolicy(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.ShieldedInstanceIntegrityPolicy content) throws java.io.IOException { SetShieldedInstanceIntegrityPolicy result = new SetShieldedInstanceIntegrityPolicy(project, zone, instance, content); initialize(result); return result; } public class SetShieldedInstanceIntegrityPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the Shielded Instance integrity policy for an instance. You can only use this method on a * running instance. This method supports PATCH semantics and uses the JSON merge patch format and * processing rules. * * Create a request for the method "instances.setShieldedInstanceIntegrityPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetShieldedInstanceIntegrityPolicy#execute()} method to invoke the * remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name or id of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.ShieldedInstanceIntegrityPolicy} * @since 1.13 */ protected SetShieldedInstanceIntegrityPolicy(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.ShieldedInstanceIntegrityPolicy content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetShieldedInstanceIntegrityPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetShieldedInstanceIntegrityPolicy) super.set$Xgafv($Xgafv); } @Override public SetShieldedInstanceIntegrityPolicy setAccessToken(java.lang.String accessToken) { return (SetShieldedInstanceIntegrityPolicy) super.setAccessToken(accessToken); } @Override public SetShieldedInstanceIntegrityPolicy setAlt(java.lang.String alt) { return (SetShieldedInstanceIntegrityPolicy) super.setAlt(alt); } @Override public SetShieldedInstanceIntegrityPolicy setCallback(java.lang.String callback) { return (SetShieldedInstanceIntegrityPolicy) super.setCallback(callback); } @Override public SetShieldedInstanceIntegrityPolicy setFields(java.lang.String fields) { return (SetShieldedInstanceIntegrityPolicy) super.setFields(fields); } @Override public SetShieldedInstanceIntegrityPolicy setKey(java.lang.String key) { return (SetShieldedInstanceIntegrityPolicy) super.setKey(key); } @Override public SetShieldedInstanceIntegrityPolicy setOauthToken(java.lang.String oauthToken) { return (SetShieldedInstanceIntegrityPolicy) super.setOauthToken(oauthToken); } @Override public SetShieldedInstanceIntegrityPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetShieldedInstanceIntegrityPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetShieldedInstanceIntegrityPolicy setQuotaUser(java.lang.String quotaUser) { return (SetShieldedInstanceIntegrityPolicy) super.setQuotaUser(quotaUser); } @Override public SetShieldedInstanceIntegrityPolicy setUploadType(java.lang.String uploadType) { return (SetShieldedInstanceIntegrityPolicy) super.setUploadType(uploadType); } @Override public SetShieldedInstanceIntegrityPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetShieldedInstanceIntegrityPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetShieldedInstanceIntegrityPolicy setUserIp(java.lang.String userIp) { return (SetShieldedInstanceIntegrityPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetShieldedInstanceIntegrityPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetShieldedInstanceIntegrityPolicy setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name or id of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name or id of the instance scoping this request. */ public SetShieldedInstanceIntegrityPolicy setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetShieldedInstanceIntegrityPolicy setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetShieldedInstanceIntegrityPolicy set(String parameterName, Object value) { return (SetShieldedInstanceIntegrityPolicy) super.set(parameterName, value); } } /** * Sets network tags for the specified instance to the data included in the request. * * Create a request for the method "instances.setTags". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetTags#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.Tags} * @return the request */ public SetTags setTags(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.Tags content) throws java.io.IOException { SetTags result = new SetTags(project, zone, instance, content); initialize(result); return result; } public class SetTags extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/setTags"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets network tags for the specified instance to the data included in the request. * * Create a request for the method "instances.setTags". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetTags#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.Tags} * @since 1.13 */ protected SetTags(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.Tags content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetTags set$Xgafv(java.lang.String $Xgafv) { return (SetTags) super.set$Xgafv($Xgafv); } @Override public SetTags setAccessToken(java.lang.String accessToken) { return (SetTags) super.setAccessToken(accessToken); } @Override public SetTags setAlt(java.lang.String alt) { return (SetTags) super.setAlt(alt); } @Override public SetTags setCallback(java.lang.String callback) { return (SetTags) super.setCallback(callback); } @Override public SetTags setFields(java.lang.String fields) { return (SetTags) super.setFields(fields); } @Override public SetTags setKey(java.lang.String key) { return (SetTags) super.setKey(key); } @Override public SetTags setOauthToken(java.lang.String oauthToken) { return (SetTags) super.setOauthToken(oauthToken); } @Override public SetTags setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetTags) super.setPrettyPrint(prettyPrint); } @Override public SetTags setQuotaUser(java.lang.String quotaUser) { return (SetTags) super.setQuotaUser(quotaUser); } @Override public SetTags setUploadType(java.lang.String uploadType) { return (SetTags) super.setUploadType(uploadType); } @Override public SetTags setUploadProtocol(java.lang.String uploadProtocol) { return (SetTags) super.setUploadProtocol(uploadProtocol); } @Override public SetTags setUserIp(java.lang.String userIp) { return (SetTags) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetTags setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetTags setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name of the instance scoping this request. */ public SetTags setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetTags setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetTags set(String parameterName, Object value) { return (SetTags) super.set(parameterName, value); } } /** * Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance * event. * * Create a request for the method "instances.simulateMaintenanceEvent". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SimulateMaintenanceEvent#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @return the request */ public SimulateMaintenanceEvent simulateMaintenanceEvent(java.lang.String project, java.lang.String zone, java.lang.String instance) throws java.io.IOException { SimulateMaintenanceEvent result = new SimulateMaintenanceEvent(project, zone, instance); initialize(result); return result; } public class SimulateMaintenanceEvent extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Simulates a host maintenance event on a VM. For more information, see Simulate a host * maintenance event. * * Create a request for the method "instances.simulateMaintenanceEvent". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SimulateMaintenanceEvent#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @since 1.13 */ protected SimulateMaintenanceEvent(java.lang.String project, java.lang.String zone, java.lang.String instance) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SimulateMaintenanceEvent set$Xgafv(java.lang.String $Xgafv) { return (SimulateMaintenanceEvent) super.set$Xgafv($Xgafv); } @Override public SimulateMaintenanceEvent setAccessToken(java.lang.String accessToken) { return (SimulateMaintenanceEvent) super.setAccessToken(accessToken); } @Override public SimulateMaintenanceEvent setAlt(java.lang.String alt) { return (SimulateMaintenanceEvent) super.setAlt(alt); } @Override public SimulateMaintenanceEvent setCallback(java.lang.String callback) { return (SimulateMaintenanceEvent) super.setCallback(callback); } @Override public SimulateMaintenanceEvent setFields(java.lang.String fields) { return (SimulateMaintenanceEvent) super.setFields(fields); } @Override public SimulateMaintenanceEvent setKey(java.lang.String key) { return (SimulateMaintenanceEvent) super.setKey(key); } @Override public SimulateMaintenanceEvent setOauthToken(java.lang.String oauthToken) { return (SimulateMaintenanceEvent) super.setOauthToken(oauthToken); } @Override public SimulateMaintenanceEvent setPrettyPrint(java.lang.Boolean prettyPrint) { return (SimulateMaintenanceEvent) super.setPrettyPrint(prettyPrint); } @Override public SimulateMaintenanceEvent setQuotaUser(java.lang.String quotaUser) { return (SimulateMaintenanceEvent) super.setQuotaUser(quotaUser); } @Override public SimulateMaintenanceEvent setUploadType(java.lang.String uploadType) { return (SimulateMaintenanceEvent) super.setUploadType(uploadType); } @Override public SimulateMaintenanceEvent setUploadProtocol(java.lang.String uploadProtocol) { return (SimulateMaintenanceEvent) super.setUploadProtocol(uploadProtocol); } @Override public SimulateMaintenanceEvent setUserIp(java.lang.String userIp) { return (SimulateMaintenanceEvent) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SimulateMaintenanceEvent setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SimulateMaintenanceEvent setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name of the instance scoping this request. */ public SimulateMaintenanceEvent setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SimulateMaintenanceEvent setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** * Determines whether the customers receive notifications before migration. Only applicable to * SF vms. */ @com.google.api.client.util.Key private java.lang.Boolean withExtendedNotifications; /** Determines whether the customers receive notifications before migration. Only applicable to SF vms. */ public java.lang.Boolean getWithExtendedNotifications() { return withExtendedNotifications; } /** * Determines whether the customers receive notifications before migration. Only applicable to * SF vms. */ public SimulateMaintenanceEvent setWithExtendedNotifications(java.lang.Boolean withExtendedNotifications) { this.withExtendedNotifications = withExtendedNotifications; return this; } @Override public SimulateMaintenanceEvent set(String parameterName, Object value) { return (SimulateMaintenanceEvent) super.set(parameterName, value); } } /** * Starts an instance that was stopped using the instances().stop method. For more information, see * Restart an instance. * * Create a request for the method "instances.start". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Start#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to start. * @return the request */ public Start start(java.lang.String project, java.lang.String zone, java.lang.String instance) throws java.io.IOException { Start result = new Start(project, zone, instance); initialize(result); return result; } public class Start extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/start"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Starts an instance that was stopped using the instances().stop method. For more information, * see Restart an instance. * * Create a request for the method "instances.start". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to start. * @since 1.13 */ protected Start(java.lang.String project, java.lang.String zone, java.lang.String instance) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Start setUserIp(java.lang.String userIp) { return (Start) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Start setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Start setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance resource to start. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance resource to start. */ public java.lang.String getInstance() { return instance; } /** Name of the instance resource to start. */ public Start setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Start setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Start set(String parameterName, Object value) { return (Start) super.set(parameterName, value); } } /** * Starts an instance that was stopped using the instances().stop method. For more information, see * Restart an instance. * * Create a request for the method "instances.startWithEncryptionKey". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link StartWithEncryptionKey#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to start. * @param content the {@link com.google.api.services.compute.model.InstancesStartWithEncryptionKeyRequest} * @return the request */ public StartWithEncryptionKey startWithEncryptionKey(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesStartWithEncryptionKeyRequest content) throws java.io.IOException { StartWithEncryptionKey result = new StartWithEncryptionKey(project, zone, instance, content); initialize(result); return result; } public class StartWithEncryptionKey extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Starts an instance that was stopped using the instances().stop method. For more information, * see Restart an instance. * * Create a request for the method "instances.startWithEncryptionKey". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link StartWithEncryptionKey#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to start. * @param content the {@link com.google.api.services.compute.model.InstancesStartWithEncryptionKeyRequest} * @since 1.13 */ protected StartWithEncryptionKey(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesStartWithEncryptionKeyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public StartWithEncryptionKey set$Xgafv(java.lang.String $Xgafv) { return (StartWithEncryptionKey) super.set$Xgafv($Xgafv); } @Override public StartWithEncryptionKey setAccessToken(java.lang.String accessToken) { return (StartWithEncryptionKey) super.setAccessToken(accessToken); } @Override public StartWithEncryptionKey setAlt(java.lang.String alt) { return (StartWithEncryptionKey) super.setAlt(alt); } @Override public StartWithEncryptionKey setCallback(java.lang.String callback) { return (StartWithEncryptionKey) super.setCallback(callback); } @Override public StartWithEncryptionKey setFields(java.lang.String fields) { return (StartWithEncryptionKey) super.setFields(fields); } @Override public StartWithEncryptionKey setKey(java.lang.String key) { return (StartWithEncryptionKey) super.setKey(key); } @Override public StartWithEncryptionKey setOauthToken(java.lang.String oauthToken) { return (StartWithEncryptionKey) super.setOauthToken(oauthToken); } @Override public StartWithEncryptionKey setPrettyPrint(java.lang.Boolean prettyPrint) { return (StartWithEncryptionKey) super.setPrettyPrint(prettyPrint); } @Override public StartWithEncryptionKey setQuotaUser(java.lang.String quotaUser) { return (StartWithEncryptionKey) super.setQuotaUser(quotaUser); } @Override public StartWithEncryptionKey setUploadType(java.lang.String uploadType) { return (StartWithEncryptionKey) super.setUploadType(uploadType); } @Override public StartWithEncryptionKey setUploadProtocol(java.lang.String uploadProtocol) { return (StartWithEncryptionKey) super.setUploadProtocol(uploadProtocol); } @Override public StartWithEncryptionKey setUserIp(java.lang.String userIp) { return (StartWithEncryptionKey) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public StartWithEncryptionKey setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public StartWithEncryptionKey setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance resource to start. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance resource to start. */ public java.lang.String getInstance() { return instance; } /** Name of the instance resource to start. */ public StartWithEncryptionKey setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public StartWithEncryptionKey setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public StartWithEncryptionKey set(String parameterName, Object value) { return (StartWithEncryptionKey) super.set(parameterName, value); } } /** * Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a * later time. Stopped instances do not incur VM usage charges while they are stopped. However, * resources that the VM is using, such as persistent disks and static IP addresses, will continue * to be charged until they are deleted. For more information, see Stopping an instance. * * Create a request for the method "instances.stop". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Stop#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to stop. * @return the request */ public Stop stop(java.lang.String project, java.lang.String zone, java.lang.String instance) throws java.io.IOException { Stop result = new Stop(project, zone, instance); initialize(result); return result; } public class Stop extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/stop"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a * later time. Stopped instances do not incur VM usage charges while they are stopped. However, * resources that the VM is using, such as persistent disks and static IP addresses, will continue * to be charged until they are deleted. For more information, see Stopping an instance. * * Create a request for the method "instances.stop". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to stop. * @since 1.13 */ protected Stop(java.lang.String project, java.lang.String zone, java.lang.String instance) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Stop setUserIp(java.lang.String userIp) { return (Stop) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Stop setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Stop setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance resource to stop. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance resource to stop. */ public java.lang.String getInstance() { return instance; } /** Name of the instance resource to stop. */ public Stop setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * This property is required if the instance has any attached Local SSD disks. If false, Local * SSD data will be preserved when the instance is suspended. If true, the contents of any * attached Local SSD disks will be discarded. */ @com.google.api.client.util.Key private java.lang.Boolean discardLocalSsd; /** This property is required if the instance has any attached Local SSD disks. If false, Local SSD data will be preserved when the instance is suspended. If true, the contents of any attached Local SSD disks will be discarded. */ public java.lang.Boolean getDiscardLocalSsd() { return discardLocalSsd; } /** * This property is required if the instance has any attached Local SSD disks. If false, Local * SSD data will be preserved when the instance is suspended. If true, the contents of any * attached Local SSD disks will be discarded. */ public Stop setDiscardLocalSsd(java.lang.Boolean discardLocalSsd) { this.discardLocalSsd = discardLocalSsd; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Stop setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Stop set(String parameterName, Object value) { return (Stop) super.set(parameterName, value); } } /** * This method suspends a running instance, saving its state to persistent storage, and allows you * to resume the instance at a later time. Suspended instances have no compute costs (cores or RAM), * and incur only storage charges for the saved VM memory and localSSD data. Any charged resources * the virtual machine was using, such as persistent disks and static IP addresses, will continue to * be charged while the instance is suspended. For more information, see Suspending and resuming an * instance. * * Create a request for the method "instances.suspend". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Suspend#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to suspend. * @return the request */ public Suspend suspend(java.lang.String project, java.lang.String zone, java.lang.String instance) throws java.io.IOException { Suspend result = new Suspend(project, zone, instance); initialize(result); return result; } public class Suspend extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/suspend"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * This method suspends a running instance, saving its state to persistent storage, and allows you * to resume the instance at a later time. Suspended instances have no compute costs (cores or * RAM), and incur only storage charges for the saved VM memory and localSSD data. Any charged * resources the virtual machine was using, such as persistent disks and static IP addresses, will * continue to be charged while the instance is suspended. For more information, see Suspending * and resuming an instance. * * Create a request for the method "instances.suspend". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Suspend#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to suspend. * @since 1.13 */ protected Suspend(java.lang.String project, java.lang.String zone, java.lang.String instance) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Suspend set$Xgafv(java.lang.String $Xgafv) { return (Suspend) super.set$Xgafv($Xgafv); } @Override public Suspend setAccessToken(java.lang.String accessToken) { return (Suspend) super.setAccessToken(accessToken); } @Override public Suspend setAlt(java.lang.String alt) { return (Suspend) super.setAlt(alt); } @Override public Suspend setCallback(java.lang.String callback) { return (Suspend) super.setCallback(callback); } @Override public Suspend setFields(java.lang.String fields) { return (Suspend) super.setFields(fields); } @Override public Suspend setKey(java.lang.String key) { return (Suspend) super.setKey(key); } @Override public Suspend setOauthToken(java.lang.String oauthToken) { return (Suspend) super.setOauthToken(oauthToken); } @Override public Suspend setPrettyPrint(java.lang.Boolean prettyPrint) { return (Suspend) super.setPrettyPrint(prettyPrint); } @Override public Suspend setQuotaUser(java.lang.String quotaUser) { return (Suspend) super.setQuotaUser(quotaUser); } @Override public Suspend setUploadType(java.lang.String uploadType) { return (Suspend) super.setUploadType(uploadType); } @Override public Suspend setUploadProtocol(java.lang.String uploadProtocol) { return (Suspend) super.setUploadProtocol(uploadProtocol); } @Override public Suspend setUserIp(java.lang.String userIp) { return (Suspend) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Suspend setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Suspend setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance resource to suspend. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance resource to suspend. */ public java.lang.String getInstance() { return instance; } /** Name of the instance resource to suspend. */ public Suspend setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * This property is required if the instance has any attached Local SSD disks. If false, Local * SSD data will be preserved when the instance is suspended. If true, the contents of any * attached Local SSD disks will be discarded. */ @com.google.api.client.util.Key private java.lang.Boolean discardLocalSsd; /** This property is required if the instance has any attached Local SSD disks. If false, Local SSD data will be preserved when the instance is suspended. If true, the contents of any attached Local SSD disks will be discarded. */ public java.lang.Boolean getDiscardLocalSsd() { return discardLocalSsd; } /** * This property is required if the instance has any attached Local SSD disks. If false, Local * SSD data will be preserved when the instance is suspended. If true, the contents of any * attached Local SSD disks will be discarded. */ public Suspend setDiscardLocalSsd(java.lang.Boolean discardLocalSsd) { this.discardLocalSsd = discardLocalSsd; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Suspend setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Suspend set(String parameterName, Object value) { return (Suspend) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "instances.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, zone, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "instances.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public TestIamPermissions setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } /** * Updates an instance only if the necessary resources are available. This method can update only a * specific set of instance properties. See Updating a running instance for a list of updatable * instance properties. * * Create a request for the method "instances.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to update. * @param content the {@link com.google.api.services.compute.model.Instance} * @return the request */ public Update update(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.Instance content) throws java.io.IOException { Update result = new Update(project, zone, instance, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates an instance only if the necessary resources are available. This method can update only * a specific set of instance properties. See Updating a running instance for a list of updatable * instance properties. * * Create a request for the method "instances.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance resource to update. * @param content the {@link com.google.api.services.compute.model.Instance} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.Instance content) { super(Compute.this, "PUT", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Update setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance resource to update. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance resource to update. */ public java.lang.String getInstance() { return instance; } /** Name of the instance resource to update. */ public Update setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * Specifies the action to take when updating an instance even if the updated properties do * not require it. If not specified, then Compute Engine acts based on the minimum action that * the updated properties require. */ @com.google.api.client.util.Key private java.lang.String minimalAction; /** Specifies the action to take when updating an instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the updated properties require. */ public java.lang.String getMinimalAction() { return minimalAction; } /** * Specifies the action to take when updating an instance even if the updated properties do * not require it. If not specified, then Compute Engine acts based on the minimum action that * the updated properties require. */ public Update setMinimalAction(java.lang.String minimalAction) { this.minimalAction = minimalAction; return this; } /** * Specifies the most disruptive action that can be taken on the instance as part of the * update. Compute Engine returns an error if the instance properties require a more * disruptive action as part of the instance update. Valid options from lowest to highest are * NO_EFFECT, REFRESH, and RESTART. */ @com.google.api.client.util.Key private java.lang.String mostDisruptiveAllowedAction; /** Specifies the most disruptive action that can be taken on the instance as part of the update. Compute Engine returns an error if the instance properties require a more disruptive action as part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, and RESTART. */ public java.lang.String getMostDisruptiveAllowedAction() { return mostDisruptiveAllowedAction; } /** * Specifies the most disruptive action that can be taken on the instance as part of the * update. Compute Engine returns an error if the instance properties require a more * disruptive action as part of the instance update. Valid options from lowest to highest are * NO_EFFECT, REFRESH, and RESTART. */ public Update setMostDisruptiveAllowedAction(java.lang.String mostDisruptiveAllowedAction) { this.mostDisruptiveAllowedAction = mostDisruptiveAllowedAction; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } /** * Updates the specified access config from an instance's network interface with the data included * in the request. This method supports PATCH semantics and uses the JSON merge patch format and * processing rules. * * Create a request for the method "instances.updateAccessConfig". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link UpdateAccessConfig#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param networkInterface The name of the network interface where the access config is attached. * @param content the {@link com.google.api.services.compute.model.AccessConfig} * @return the request */ public UpdateAccessConfig updateAccessConfig(java.lang.String project, java.lang.String zone, java.lang.String instance, java.lang.String networkInterface, com.google.api.services.compute.model.AccessConfig content) throws java.io.IOException { UpdateAccessConfig result = new UpdateAccessConfig(project, zone, instance, networkInterface, content); initialize(result); return result; } public class UpdateAccessConfig extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified access config from an instance's network interface with the data included * in the request. This method supports PATCH semantics and uses the JSON merge patch format and * processing rules. * * Create a request for the method "instances.updateAccessConfig". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link UpdateAccessConfig#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param networkInterface The name of the network interface where the access config is attached. * @param content the {@link com.google.api.services.compute.model.AccessConfig} * @since 1.13 */ protected UpdateAccessConfig(java.lang.String project, java.lang.String zone, java.lang.String instance, java.lang.String networkInterface, com.google.api.services.compute.model.AccessConfig content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.networkInterface = com.google.api.client.util.Preconditions.checkNotNull(networkInterface, "Required parameter networkInterface must be specified."); } @Override public UpdateAccessConfig set$Xgafv(java.lang.String $Xgafv) { return (UpdateAccessConfig) super.set$Xgafv($Xgafv); } @Override public UpdateAccessConfig setAccessToken(java.lang.String accessToken) { return (UpdateAccessConfig) super.setAccessToken(accessToken); } @Override public UpdateAccessConfig setAlt(java.lang.String alt) { return (UpdateAccessConfig) super.setAlt(alt); } @Override public UpdateAccessConfig setCallback(java.lang.String callback) { return (UpdateAccessConfig) super.setCallback(callback); } @Override public UpdateAccessConfig setFields(java.lang.String fields) { return (UpdateAccessConfig) super.setFields(fields); } @Override public UpdateAccessConfig setKey(java.lang.String key) { return (UpdateAccessConfig) super.setKey(key); } @Override public UpdateAccessConfig setOauthToken(java.lang.String oauthToken) { return (UpdateAccessConfig) super.setOauthToken(oauthToken); } @Override public UpdateAccessConfig setPrettyPrint(java.lang.Boolean prettyPrint) { return (UpdateAccessConfig) super.setPrettyPrint(prettyPrint); } @Override public UpdateAccessConfig setQuotaUser(java.lang.String quotaUser) { return (UpdateAccessConfig) super.setQuotaUser(quotaUser); } @Override public UpdateAccessConfig setUploadType(java.lang.String uploadType) { return (UpdateAccessConfig) super.setUploadType(uploadType); } @Override public UpdateAccessConfig setUploadProtocol(java.lang.String uploadProtocol) { return (UpdateAccessConfig) super.setUploadProtocol(uploadProtocol); } @Override public UpdateAccessConfig setUserIp(java.lang.String userIp) { return (UpdateAccessConfig) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public UpdateAccessConfig setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public UpdateAccessConfig setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The instance name for this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** The instance name for this request. */ public java.lang.String getInstance() { return instance; } /** The instance name for this request. */ public UpdateAccessConfig setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** The name of the network interface where the access config is attached. */ @com.google.api.client.util.Key private java.lang.String networkInterface; /** The name of the network interface where the access config is attached. */ public java.lang.String getNetworkInterface() { return networkInterface; } /** The name of the network interface where the access config is attached. */ public UpdateAccessConfig setNetworkInterface(java.lang.String networkInterface) { this.networkInterface = networkInterface; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public UpdateAccessConfig setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public UpdateAccessConfig set(String parameterName, Object value) { return (UpdateAccessConfig) super.set(parameterName, value); } } /** * Updates the Display config for a VM instance. You can only use this method on a stopped VM * instance. This method supports PATCH semantics and uses the JSON merge patch format and * processing rules. * * Create a request for the method "instances.updateDisplayDevice". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link UpdateDisplayDevice#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.DisplayDevice} * @return the request */ public UpdateDisplayDevice updateDisplayDevice(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.DisplayDevice content) throws java.io.IOException { UpdateDisplayDevice result = new UpdateDisplayDevice(project, zone, instance, content); initialize(result); return result; } public class UpdateDisplayDevice extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Updates the Display config for a VM instance. You can only use this method on a stopped VM * instance. This method supports PATCH semantics and uses the JSON merge patch format and * processing rules. * * Create a request for the method "instances.updateDisplayDevice". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link UpdateDisplayDevice#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.DisplayDevice} * @since 1.13 */ protected UpdateDisplayDevice(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.DisplayDevice content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public UpdateDisplayDevice set$Xgafv(java.lang.String $Xgafv) { return (UpdateDisplayDevice) super.set$Xgafv($Xgafv); } @Override public UpdateDisplayDevice setAccessToken(java.lang.String accessToken) { return (UpdateDisplayDevice) super.setAccessToken(accessToken); } @Override public UpdateDisplayDevice setAlt(java.lang.String alt) { return (UpdateDisplayDevice) super.setAlt(alt); } @Override public UpdateDisplayDevice setCallback(java.lang.String callback) { return (UpdateDisplayDevice) super.setCallback(callback); } @Override public UpdateDisplayDevice setFields(java.lang.String fields) { return (UpdateDisplayDevice) super.setFields(fields); } @Override public UpdateDisplayDevice setKey(java.lang.String key) { return (UpdateDisplayDevice) super.setKey(key); } @Override public UpdateDisplayDevice setOauthToken(java.lang.String oauthToken) { return (UpdateDisplayDevice) super.setOauthToken(oauthToken); } @Override public UpdateDisplayDevice setPrettyPrint(java.lang.Boolean prettyPrint) { return (UpdateDisplayDevice) super.setPrettyPrint(prettyPrint); } @Override public UpdateDisplayDevice setQuotaUser(java.lang.String quotaUser) { return (UpdateDisplayDevice) super.setQuotaUser(quotaUser); } @Override public UpdateDisplayDevice setUploadType(java.lang.String uploadType) { return (UpdateDisplayDevice) super.setUploadType(uploadType); } @Override public UpdateDisplayDevice setUploadProtocol(java.lang.String uploadProtocol) { return (UpdateDisplayDevice) super.setUploadProtocol(uploadProtocol); } @Override public UpdateDisplayDevice setUserIp(java.lang.String userIp) { return (UpdateDisplayDevice) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public UpdateDisplayDevice setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public UpdateDisplayDevice setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name of the instance scoping this request. */ public UpdateDisplayDevice setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public UpdateDisplayDevice setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public UpdateDisplayDevice set(String parameterName, Object value) { return (UpdateDisplayDevice) super.set(parameterName, value); } } /** * Updates an instance's network interface. This method can only update an interface's alias IP * range and attached network. See Modifying alias IP ranges for an existing instance for * instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on * migrating an interface. This method follows PATCH semantics. * * Create a request for the method "instances.updateNetworkInterface". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link UpdateNetworkInterface#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param networkInterface The name of the network interface to update. * @param content the {@link com.google.api.services.compute.model.NetworkInterface} * @return the request */ public UpdateNetworkInterface updateNetworkInterface(java.lang.String project, java.lang.String zone, java.lang.String instance, java.lang.String networkInterface, com.google.api.services.compute.model.NetworkInterface content) throws java.io.IOException { UpdateNetworkInterface result = new UpdateNetworkInterface(project, zone, instance, networkInterface, content); initialize(result); return result; } public class UpdateNetworkInterface extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates an instance's network interface. This method can only update an interface's alias IP * range and attached network. See Modifying alias IP ranges for an existing instance for * instructions on changing alias IP ranges. See Migrating a VM between networks for instructions * on migrating an interface. This method follows PATCH semantics. * * Create a request for the method "instances.updateNetworkInterface". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link UpdateNetworkInterface#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance The instance name for this request. * @param networkInterface The name of the network interface to update. * @param content the {@link com.google.api.services.compute.model.NetworkInterface} * @since 1.13 */ protected UpdateNetworkInterface(java.lang.String project, java.lang.String zone, java.lang.String instance, java.lang.String networkInterface, com.google.api.services.compute.model.NetworkInterface content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.networkInterface = com.google.api.client.util.Preconditions.checkNotNull(networkInterface, "Required parameter networkInterface must be specified."); } @Override public UpdateNetworkInterface set$Xgafv(java.lang.String $Xgafv) { return (UpdateNetworkInterface) super.set$Xgafv($Xgafv); } @Override public UpdateNetworkInterface setAccessToken(java.lang.String accessToken) { return (UpdateNetworkInterface) super.setAccessToken(accessToken); } @Override public UpdateNetworkInterface setAlt(java.lang.String alt) { return (UpdateNetworkInterface) super.setAlt(alt); } @Override public UpdateNetworkInterface setCallback(java.lang.String callback) { return (UpdateNetworkInterface) super.setCallback(callback); } @Override public UpdateNetworkInterface setFields(java.lang.String fields) { return (UpdateNetworkInterface) super.setFields(fields); } @Override public UpdateNetworkInterface setKey(java.lang.String key) { return (UpdateNetworkInterface) super.setKey(key); } @Override public UpdateNetworkInterface setOauthToken(java.lang.String oauthToken) { return (UpdateNetworkInterface) super.setOauthToken(oauthToken); } @Override public UpdateNetworkInterface setPrettyPrint(java.lang.Boolean prettyPrint) { return (UpdateNetworkInterface) super.setPrettyPrint(prettyPrint); } @Override public UpdateNetworkInterface setQuotaUser(java.lang.String quotaUser) { return (UpdateNetworkInterface) super.setQuotaUser(quotaUser); } @Override public UpdateNetworkInterface setUploadType(java.lang.String uploadType) { return (UpdateNetworkInterface) super.setUploadType(uploadType); } @Override public UpdateNetworkInterface setUploadProtocol(java.lang.String uploadProtocol) { return (UpdateNetworkInterface) super.setUploadProtocol(uploadProtocol); } @Override public UpdateNetworkInterface setUserIp(java.lang.String userIp) { return (UpdateNetworkInterface) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public UpdateNetworkInterface setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public UpdateNetworkInterface setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The instance name for this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** The instance name for this request. */ public java.lang.String getInstance() { return instance; } /** The instance name for this request. */ public UpdateNetworkInterface setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** The name of the network interface to update. */ @com.google.api.client.util.Key private java.lang.String networkInterface; /** The name of the network interface to update. */ public java.lang.String getNetworkInterface() { return networkInterface; } /** The name of the network interface to update. */ public UpdateNetworkInterface setNetworkInterface(java.lang.String networkInterface) { this.networkInterface = networkInterface; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public UpdateNetworkInterface setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public UpdateNetworkInterface set(String parameterName, Object value) { return (UpdateNetworkInterface) super.set(parameterName, value); } } /** * Updates the Shielded Instance config for an instance. You can only use this method on a stopped * instance. This method supports PATCH semantics and uses the JSON merge patch format and * processing rules. * * Create a request for the method "instances.updateShieldedInstanceConfig". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link UpdateShieldedInstanceConfig#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name or id of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.ShieldedInstanceConfig} * @return the request */ public UpdateShieldedInstanceConfig updateShieldedInstanceConfig(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.ShieldedInstanceConfig content) throws java.io.IOException { UpdateShieldedInstanceConfig result = new UpdateShieldedInstanceConfig(project, zone, instance, content); initialize(result); return result; } public class UpdateShieldedInstanceConfig extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the Shielded Instance config for an instance. You can only use this method on a stopped * instance. This method supports PATCH semantics and uses the JSON merge patch format and * processing rules. * * Create a request for the method "instances.updateShieldedInstanceConfig". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link UpdateShieldedInstanceConfig#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instance Name or id of the instance scoping this request. * @param content the {@link com.google.api.services.compute.model.ShieldedInstanceConfig} * @since 1.13 */ protected UpdateShieldedInstanceConfig(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.ShieldedInstanceConfig content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public UpdateShieldedInstanceConfig set$Xgafv(java.lang.String $Xgafv) { return (UpdateShieldedInstanceConfig) super.set$Xgafv($Xgafv); } @Override public UpdateShieldedInstanceConfig setAccessToken(java.lang.String accessToken) { return (UpdateShieldedInstanceConfig) super.setAccessToken(accessToken); } @Override public UpdateShieldedInstanceConfig setAlt(java.lang.String alt) { return (UpdateShieldedInstanceConfig) super.setAlt(alt); } @Override public UpdateShieldedInstanceConfig setCallback(java.lang.String callback) { return (UpdateShieldedInstanceConfig) super.setCallback(callback); } @Override public UpdateShieldedInstanceConfig setFields(java.lang.String fields) { return (UpdateShieldedInstanceConfig) super.setFields(fields); } @Override public UpdateShieldedInstanceConfig setKey(java.lang.String key) { return (UpdateShieldedInstanceConfig) super.setKey(key); } @Override public UpdateShieldedInstanceConfig setOauthToken(java.lang.String oauthToken) { return (UpdateShieldedInstanceConfig) super.setOauthToken(oauthToken); } @Override public UpdateShieldedInstanceConfig setPrettyPrint(java.lang.Boolean prettyPrint) { return (UpdateShieldedInstanceConfig) super.setPrettyPrint(prettyPrint); } @Override public UpdateShieldedInstanceConfig setQuotaUser(java.lang.String quotaUser) { return (UpdateShieldedInstanceConfig) super.setQuotaUser(quotaUser); } @Override public UpdateShieldedInstanceConfig setUploadType(java.lang.String uploadType) { return (UpdateShieldedInstanceConfig) super.setUploadType(uploadType); } @Override public UpdateShieldedInstanceConfig setUploadProtocol(java.lang.String uploadProtocol) { return (UpdateShieldedInstanceConfig) super.setUploadProtocol(uploadProtocol); } @Override public UpdateShieldedInstanceConfig setUserIp(java.lang.String userIp) { return (UpdateShieldedInstanceConfig) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public UpdateShieldedInstanceConfig setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public UpdateShieldedInstanceConfig setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the instance scoping this request. */ @com.google.api.client.util.Key private java.lang.String instance; /** Name or id of the instance scoping this request. */ public java.lang.String getInstance() { return instance; } /** Name or id of the instance scoping this request. */ public UpdateShieldedInstanceConfig setInstance(java.lang.String instance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(), "Parameter instance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instance = instance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public UpdateShieldedInstanceConfig setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public UpdateShieldedInstanceConfig set(String parameterName, Object value) { return (UpdateShieldedInstanceConfig) super.set(parameterName, value); } } } /** * An accessor for creating requests from the InstantSnapshots collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.InstantSnapshots.List request = compute.instantSnapshots().list(parameters ...)}
   * 
* * @return the resource collection */ public InstantSnapshots instantSnapshots() { return new InstantSnapshots(); } /** * The "instantSnapshots" collection of methods. */ public class InstantSnapshots { /** * Retrieves an aggregated list of instantSnapshots. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "instantSnapshots.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/instantSnapshots"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of instantSnapshots. To prevent failure, Google recommends that * you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "instantSnapshots.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstantSnapshotAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified InstantSnapshot resource. Keep in mind that deleting a single * instantSnapshot might not necessarily delete all the data on that instantSnapshot. If any data on * the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the * data will be moved to the next corresponding instantSnapshot. For more information, see Deleting * instantSnapshots. * * Create a request for the method "instantSnapshots.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instantSnapshot Name of the InstantSnapshot resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String zone, java.lang.String instantSnapshot) throws java.io.IOException { Delete result = new Delete(project, zone, instantSnapshot); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANT_SNAPSHOT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified InstantSnapshot resource. Keep in mind that deleting a single * instantSnapshot might not necessarily delete all the data on that instantSnapshot. If any data * on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, * the data will be moved to the next corresponding instantSnapshot. For more information, see * Deleting instantSnapshots. * * Create a request for the method "instantSnapshots.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param instantSnapshot Name of the InstantSnapshot resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String zone, java.lang.String instantSnapshot) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instantSnapshot = com.google.api.client.util.Preconditions.checkNotNull(instantSnapshot, "Required parameter instantSnapshot must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANT_SNAPSHOT_PATTERN.matcher(instantSnapshot).matches(), "Parameter instantSnapshot must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Delete setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the InstantSnapshot resource to delete. */ @com.google.api.client.util.Key private java.lang.String instantSnapshot; /** Name of the InstantSnapshot resource to delete. */ public java.lang.String getInstantSnapshot() { return instantSnapshot; } /** Name of the InstantSnapshot resource to delete. */ public Delete setInstantSnapshot(java.lang.String instantSnapshot) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANT_SNAPSHOT_PATTERN.matcher(instantSnapshot).matches(), "Parameter instantSnapshot must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instantSnapshot = instantSnapshot; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified InstantSnapshot resource in the specified zone. * * Create a request for the method "instantSnapshots.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param instantSnapshot Name of the InstantSnapshot resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String instantSnapshot) throws java.io.IOException { Get result = new Get(project, zone, instantSnapshot); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANT_SNAPSHOT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified InstantSnapshot resource in the specified zone. * * Create a request for the method "instantSnapshots.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param instantSnapshot Name of the InstantSnapshot resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String instantSnapshot) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstantSnapshot.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instantSnapshot = com.google.api.client.util.Preconditions.checkNotNull(instantSnapshot, "Required parameter instantSnapshot must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANT_SNAPSHOT_PATTERN.matcher(instantSnapshot).matches(), "Parameter instantSnapshot must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the InstantSnapshot resource to return. */ @com.google.api.client.util.Key private java.lang.String instantSnapshot; /** Name of the InstantSnapshot resource to return. */ public java.lang.String getInstantSnapshot() { return instantSnapshot; } /** Name of the InstantSnapshot resource to return. */ public Get setInstantSnapshot(java.lang.String instantSnapshot) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANT_SNAPSHOT_PATTERN.matcher(instantSnapshot).matches(), "Parameter instantSnapshot must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instantSnapshot = instantSnapshot; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "instantSnapshots.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, zone, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instantSnapshots/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "instantSnapshots.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public GetIamPolicy setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates an instant snapshot in the specified zone. * * Create a request for the method "instantSnapshots.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.InstantSnapshot} * @return the request */ public Insert insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.InstantSnapshot content) throws java.io.IOException { Insert result = new Insert(project, zone, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instantSnapshots"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates an instant snapshot in the specified zone. * * Create a request for the method "instantSnapshots.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.InstantSnapshot} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.InstantSnapshot content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public Insert setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of InstantSnapshot resources contained within the specified zone. * * Create a request for the method "instantSnapshots.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instantSnapshots"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves the list of InstantSnapshot resources contained within the specified zone. * * Create a request for the method "instantSnapshots.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstantSnapshotList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public List setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "instantSnapshots.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, zone, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "instantSnapshots.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetIamPolicy setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Sets the labels on a instantSnapshot in the given zone. To learn more about labels, read the * Labeling Resources documentation. * * Create a request for the method "instantSnapshots.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, zone, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on a instantSnapshot in the given zone. To learn more about labels, read the * Labeling Resources documentation. * * Create a request for the method "instantSnapshots.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetLabels setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetLabels setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "instantSnapshots.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, zone, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/instantSnapshots/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "instantSnapshots.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public TestIamPermissions setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the InterconnectAttachments collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.InterconnectAttachments.List request = compute.interconnectAttachments().list(parameters ...)}
   * 
* * @return the resource collection */ public InterconnectAttachments interconnectAttachments() { return new InterconnectAttachments(); } /** * The "interconnectAttachments" collection of methods. */ public class InterconnectAttachments { /** * Retrieves an aggregated list of interconnect attachments. To prevent failure, Google recommends * that you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "interconnectAttachments.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/interconnectAttachments"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of interconnect attachments. To prevent failure, Google recommends * that you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "interconnectAttachments.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InterconnectAttachmentAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified interconnect attachment. * * Create a request for the method "interconnectAttachments.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param interconnectAttachment Name of the interconnect attachment to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String interconnectAttachment) throws java.io.IOException { Delete result = new Delete(project, region, interconnectAttachment); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INTERCONNECT_ATTACHMENT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified interconnect attachment. * * Create a request for the method "interconnectAttachments.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param interconnectAttachment Name of the interconnect attachment to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String interconnectAttachment) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.interconnectAttachment = com.google.api.client.util.Preconditions.checkNotNull(interconnectAttachment, "Required parameter interconnectAttachment must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_ATTACHMENT_PATTERN.matcher(interconnectAttachment).matches(), "Parameter interconnectAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the interconnect attachment to delete. */ @com.google.api.client.util.Key private java.lang.String interconnectAttachment; /** Name of the interconnect attachment to delete. */ public java.lang.String getInterconnectAttachment() { return interconnectAttachment; } /** Name of the interconnect attachment to delete. */ public Delete setInterconnectAttachment(java.lang.String interconnectAttachment) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_ATTACHMENT_PATTERN.matcher(interconnectAttachment).matches(), "Parameter interconnectAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.interconnectAttachment = interconnectAttachment; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified interconnect attachment. * * Create a request for the method "interconnectAttachments.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param interconnectAttachment Name of the interconnect attachment to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String interconnectAttachment) throws java.io.IOException { Get result = new Get(project, region, interconnectAttachment); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INTERCONNECT_ATTACHMENT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified interconnect attachment. * * Create a request for the method "interconnectAttachments.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param interconnectAttachment Name of the interconnect attachment to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String interconnectAttachment) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InterconnectAttachment.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.interconnectAttachment = com.google.api.client.util.Preconditions.checkNotNull(interconnectAttachment, "Required parameter interconnectAttachment must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_ATTACHMENT_PATTERN.matcher(interconnectAttachment).matches(), "Parameter interconnectAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the interconnect attachment to return. */ @com.google.api.client.util.Key private java.lang.String interconnectAttachment; /** Name of the interconnect attachment to return. */ public java.lang.String getInterconnectAttachment() { return interconnectAttachment; } /** Name of the interconnect attachment to return. */ public Get setInterconnectAttachment(java.lang.String interconnectAttachment) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_ATTACHMENT_PATTERN.matcher(interconnectAttachment).matches(), "Parameter interconnectAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.interconnectAttachment = interconnectAttachment; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates an InterconnectAttachment in the specified project using the data included in the * request. * * Create a request for the method "interconnectAttachments.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.InterconnectAttachment} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.InterconnectAttachment content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/interconnectAttachments"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates an InterconnectAttachment in the specified project using the data included in the * request. * * Create a request for the method "interconnectAttachments.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.InterconnectAttachment} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.InterconnectAttachment content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** If true, the request will not be committed. */ @com.google.api.client.util.Key private java.lang.Boolean validateOnly; /** If true, the request will not be committed. */ public java.lang.Boolean getValidateOnly() { return validateOnly; } /** If true, the request will not be committed. */ public Insert setValidateOnly(java.lang.Boolean validateOnly) { this.validateOnly = validateOnly; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of interconnect attachments contained within the specified region. * * Create a request for the method "interconnectAttachments.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/interconnectAttachments"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves the list of interconnect attachments contained within the specified region. * * Create a request for the method "interconnectAttachments.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InterconnectAttachmentList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the specified interconnect attachment with the data included in the request. This method * supports PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "interconnectAttachments.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param interconnectAttachment Name of the interconnect attachment to patch. * @param content the {@link com.google.api.services.compute.model.InterconnectAttachment} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String interconnectAttachment, com.google.api.services.compute.model.InterconnectAttachment content) throws java.io.IOException { Patch result = new Patch(project, region, interconnectAttachment, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INTERCONNECT_ATTACHMENT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified interconnect attachment with the data included in the request. This * method supports PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "interconnectAttachments.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param interconnectAttachment Name of the interconnect attachment to patch. * @param content the {@link com.google.api.services.compute.model.InterconnectAttachment} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String interconnectAttachment, com.google.api.services.compute.model.InterconnectAttachment content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.interconnectAttachment = com.google.api.client.util.Preconditions.checkNotNull(interconnectAttachment, "Required parameter interconnectAttachment must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_ATTACHMENT_PATTERN.matcher(interconnectAttachment).matches(), "Parameter interconnectAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the interconnect attachment to patch. */ @com.google.api.client.util.Key private java.lang.String interconnectAttachment; /** Name of the interconnect attachment to patch. */ public java.lang.String getInterconnectAttachment() { return interconnectAttachment; } /** Name of the interconnect attachment to patch. */ public Patch setInterconnectAttachment(java.lang.String interconnectAttachment) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_ATTACHMENT_PATTERN.matcher(interconnectAttachment).matches(), "Parameter interconnectAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.interconnectAttachment = interconnectAttachment; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling * Resources documentation. * * Create a request for the method "interconnectAttachments.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, region, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/interconnectAttachments/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling * Resources documentation. * * Create a request for the method "interconnectAttachments.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The region for this request. */ public java.lang.String getRegion() { return region; } /** The region for this request. */ public SetLabels setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetLabels setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } } /** * An accessor for creating requests from the InterconnectLocations collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.InterconnectLocations.List request = compute.interconnectLocations().list(parameters ...)}
   * 
* * @return the resource collection */ public InterconnectLocations interconnectLocations() { return new InterconnectLocations(); } /** * The "interconnectLocations" collection of methods. */ public class InterconnectLocations { /** * Returns the details for the specified interconnect location. Gets a list of available * interconnect locations by making a list() request. * * Create a request for the method "interconnectLocations.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param interconnectLocation Name of the interconnect location to return. * @return the request */ public Get get(java.lang.String project, java.lang.String interconnectLocation) throws java.io.IOException { Get result = new Get(project, interconnectLocation); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/interconnectLocations/{interconnectLocation}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern INTERCONNECT_LOCATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the details for the specified interconnect location. Gets a list of available * interconnect locations by making a list() request. * * Create a request for the method "interconnectLocations.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param interconnectLocation Name of the interconnect location to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String interconnectLocation) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InterconnectLocation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.interconnectLocation = com.google.api.client.util.Preconditions.checkNotNull(interconnectLocation, "Required parameter interconnectLocation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_LOCATION_PATTERN.matcher(interconnectLocation).matches(), "Parameter interconnectLocation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the interconnect location to return. */ @com.google.api.client.util.Key private java.lang.String interconnectLocation; /** Name of the interconnect location to return. */ public java.lang.String getInterconnectLocation() { return interconnectLocation; } /** Name of the interconnect location to return. */ public Get setInterconnectLocation(java.lang.String interconnectLocation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_LOCATION_PATTERN.matcher(interconnectLocation).matches(), "Parameter interconnectLocation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.interconnectLocation = interconnectLocation; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves the list of interconnect locations available to the specified project. * * Create a request for the method "interconnectLocations.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/interconnectLocations"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of interconnect locations available to the specified project. * * Create a request for the method "interconnectLocations.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InterconnectLocationList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the InterconnectRemoteLocations collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.InterconnectRemoteLocations.List request = compute.interconnectRemoteLocations().list(parameters ...)}
   * 
* * @return the resource collection */ public InterconnectRemoteLocations interconnectRemoteLocations() { return new InterconnectRemoteLocations(); } /** * The "interconnectRemoteLocations" collection of methods. */ public class InterconnectRemoteLocations { /** * Returns the details for the specified interconnect remote location. Gets a list of available * interconnect remote locations by making a list() request. * * Create a request for the method "interconnectRemoteLocations.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param interconnectRemoteLocation Name of the interconnect remote location to return. * @return the request */ public Get get(java.lang.String project, java.lang.String interconnectRemoteLocation) throws java.io.IOException { Get result = new Get(project, interconnectRemoteLocation); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern INTERCONNECT_REMOTE_LOCATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the details for the specified interconnect remote location. Gets a list of available * interconnect remote locations by making a list() request. * * Create a request for the method "interconnectRemoteLocations.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param interconnectRemoteLocation Name of the interconnect remote location to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String interconnectRemoteLocation) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InterconnectRemoteLocation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.interconnectRemoteLocation = com.google.api.client.util.Preconditions.checkNotNull(interconnectRemoteLocation, "Required parameter interconnectRemoteLocation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_REMOTE_LOCATION_PATTERN.matcher(interconnectRemoteLocation).matches(), "Parameter interconnectRemoteLocation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the interconnect remote location to return. */ @com.google.api.client.util.Key private java.lang.String interconnectRemoteLocation; /** Name of the interconnect remote location to return. */ public java.lang.String getInterconnectRemoteLocation() { return interconnectRemoteLocation; } /** Name of the interconnect remote location to return. */ public Get setInterconnectRemoteLocation(java.lang.String interconnectRemoteLocation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_REMOTE_LOCATION_PATTERN.matcher(interconnectRemoteLocation).matches(), "Parameter interconnectRemoteLocation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.interconnectRemoteLocation = interconnectRemoteLocation; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves the list of interconnect remote locations available to the specified project. * * Create a request for the method "interconnectRemoteLocations.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/interconnectRemoteLocations"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of interconnect remote locations available to the specified project. * * Create a request for the method "interconnectRemoteLocations.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InterconnectRemoteLocationList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Interconnects collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Interconnects.List request = compute.interconnects().list(parameters ...)}
   * 
* * @return the resource collection */ public Interconnects interconnects() { return new Interconnects(); } /** * The "interconnects" collection of methods. */ public class Interconnects { /** * Deletes the specified Interconnect. * * Create a request for the method "interconnects.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param interconnect Name of the interconnect to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String interconnect) throws java.io.IOException { Delete result = new Delete(project, interconnect); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/interconnects/{interconnect}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern INTERCONNECT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified Interconnect. * * Create a request for the method "interconnects.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param interconnect Name of the interconnect to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String interconnect) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.interconnect = com.google.api.client.util.Preconditions.checkNotNull(interconnect, "Required parameter interconnect must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_PATTERN.matcher(interconnect).matches(), "Parameter interconnect must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the interconnect to delete. */ @com.google.api.client.util.Key private java.lang.String interconnect; /** Name of the interconnect to delete. */ public java.lang.String getInterconnect() { return interconnect; } /** Name of the interconnect to delete. */ public Delete setInterconnect(java.lang.String interconnect) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_PATTERN.matcher(interconnect).matches(), "Parameter interconnect must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.interconnect = interconnect; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified Interconnect. Get a list of available Interconnects by making a list() * request. * * Create a request for the method "interconnects.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param interconnect Name of the interconnect to return. * @return the request */ public Get get(java.lang.String project, java.lang.String interconnect) throws java.io.IOException { Get result = new Get(project, interconnect); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/interconnects/{interconnect}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern INTERCONNECT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified Interconnect. Get a list of available Interconnects by making a list() * request. * * Create a request for the method "interconnects.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param interconnect Name of the interconnect to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String interconnect) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Interconnect.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.interconnect = com.google.api.client.util.Preconditions.checkNotNull(interconnect, "Required parameter interconnect must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_PATTERN.matcher(interconnect).matches(), "Parameter interconnect must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the interconnect to return. */ @com.google.api.client.util.Key private java.lang.String interconnect; /** Name of the interconnect to return. */ public java.lang.String getInterconnect() { return interconnect; } /** Name of the interconnect to return. */ public Get setInterconnect(java.lang.String interconnect) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_PATTERN.matcher(interconnect).matches(), "Parameter interconnect must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.interconnect = interconnect; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Returns the interconnectDiagnostics for the specified Interconnect. In the event of a global * outage, do not use this API to make decisions about where to redirect your network traffic. * Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global * resource. A global outage can prevent this API from functioning properly. * * Create a request for the method "interconnects.getDiagnostics". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetDiagnostics#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param interconnect Name of the interconnect resource to query. * @return the request */ public GetDiagnostics getDiagnostics(java.lang.String project, java.lang.String interconnect) throws java.io.IOException { GetDiagnostics result = new GetDiagnostics(project, interconnect); initialize(result); return result; } public class GetDiagnostics extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/interconnects/{interconnect}/getDiagnostics"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern INTERCONNECT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the interconnectDiagnostics for the specified Interconnect. In the event of a global * outage, do not use this API to make decisions about where to redirect your network traffic. * Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global * resource. A global outage can prevent this API from functioning properly. * * Create a request for the method "interconnects.getDiagnostics". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetDiagnostics#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param interconnect Name of the interconnect resource to query. * @since 1.13 */ protected GetDiagnostics(java.lang.String project, java.lang.String interconnect) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InterconnectsGetDiagnosticsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.interconnect = com.google.api.client.util.Preconditions.checkNotNull(interconnect, "Required parameter interconnect must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_PATTERN.matcher(interconnect).matches(), "Parameter interconnect must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetDiagnostics set$Xgafv(java.lang.String $Xgafv) { return (GetDiagnostics) super.set$Xgafv($Xgafv); } @Override public GetDiagnostics setAccessToken(java.lang.String accessToken) { return (GetDiagnostics) super.setAccessToken(accessToken); } @Override public GetDiagnostics setAlt(java.lang.String alt) { return (GetDiagnostics) super.setAlt(alt); } @Override public GetDiagnostics setCallback(java.lang.String callback) { return (GetDiagnostics) super.setCallback(callback); } @Override public GetDiagnostics setFields(java.lang.String fields) { return (GetDiagnostics) super.setFields(fields); } @Override public GetDiagnostics setKey(java.lang.String key) { return (GetDiagnostics) super.setKey(key); } @Override public GetDiagnostics setOauthToken(java.lang.String oauthToken) { return (GetDiagnostics) super.setOauthToken(oauthToken); } @Override public GetDiagnostics setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetDiagnostics) super.setPrettyPrint(prettyPrint); } @Override public GetDiagnostics setQuotaUser(java.lang.String quotaUser) { return (GetDiagnostics) super.setQuotaUser(quotaUser); } @Override public GetDiagnostics setUploadType(java.lang.String uploadType) { return (GetDiagnostics) super.setUploadType(uploadType); } @Override public GetDiagnostics setUploadProtocol(java.lang.String uploadProtocol) { return (GetDiagnostics) super.setUploadProtocol(uploadProtocol); } @Override public GetDiagnostics setUserIp(java.lang.String userIp) { return (GetDiagnostics) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetDiagnostics setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the interconnect resource to query. */ @com.google.api.client.util.Key private java.lang.String interconnect; /** Name of the interconnect resource to query. */ public java.lang.String getInterconnect() { return interconnect; } /** Name of the interconnect resource to query. */ public GetDiagnostics setInterconnect(java.lang.String interconnect) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_PATTERN.matcher(interconnect).matches(), "Parameter interconnect must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.interconnect = interconnect; return this; } @Override public GetDiagnostics set(String parameterName, Object value) { return (GetDiagnostics) super.set(parameterName, value); } } /** * Returns the interconnectMacsecConfig for the specified Interconnect. * * Create a request for the method "interconnects.getMacsecConfig". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetMacsecConfig#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param interconnect Name of the interconnect resource to query. * @return the request */ public GetMacsecConfig getMacsecConfig(java.lang.String project, java.lang.String interconnect) throws java.io.IOException { GetMacsecConfig result = new GetMacsecConfig(project, interconnect); initialize(result); return result; } public class GetMacsecConfig extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/interconnects/{interconnect}/getMacsecConfig"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern INTERCONNECT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the interconnectMacsecConfig for the specified Interconnect. * * Create a request for the method "interconnects.getMacsecConfig". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetMacsecConfig#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param interconnect Name of the interconnect resource to query. * @since 1.13 */ protected GetMacsecConfig(java.lang.String project, java.lang.String interconnect) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InterconnectsGetMacsecConfigResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.interconnect = com.google.api.client.util.Preconditions.checkNotNull(interconnect, "Required parameter interconnect must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_PATTERN.matcher(interconnect).matches(), "Parameter interconnect must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetMacsecConfig set$Xgafv(java.lang.String $Xgafv) { return (GetMacsecConfig) super.set$Xgafv($Xgafv); } @Override public GetMacsecConfig setAccessToken(java.lang.String accessToken) { return (GetMacsecConfig) super.setAccessToken(accessToken); } @Override public GetMacsecConfig setAlt(java.lang.String alt) { return (GetMacsecConfig) super.setAlt(alt); } @Override public GetMacsecConfig setCallback(java.lang.String callback) { return (GetMacsecConfig) super.setCallback(callback); } @Override public GetMacsecConfig setFields(java.lang.String fields) { return (GetMacsecConfig) super.setFields(fields); } @Override public GetMacsecConfig setKey(java.lang.String key) { return (GetMacsecConfig) super.setKey(key); } @Override public GetMacsecConfig setOauthToken(java.lang.String oauthToken) { return (GetMacsecConfig) super.setOauthToken(oauthToken); } @Override public GetMacsecConfig setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetMacsecConfig) super.setPrettyPrint(prettyPrint); } @Override public GetMacsecConfig setQuotaUser(java.lang.String quotaUser) { return (GetMacsecConfig) super.setQuotaUser(quotaUser); } @Override public GetMacsecConfig setUploadType(java.lang.String uploadType) { return (GetMacsecConfig) super.setUploadType(uploadType); } @Override public GetMacsecConfig setUploadProtocol(java.lang.String uploadProtocol) { return (GetMacsecConfig) super.setUploadProtocol(uploadProtocol); } @Override public GetMacsecConfig setUserIp(java.lang.String userIp) { return (GetMacsecConfig) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetMacsecConfig setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the interconnect resource to query. */ @com.google.api.client.util.Key private java.lang.String interconnect; /** Name of the interconnect resource to query. */ public java.lang.String getInterconnect() { return interconnect; } /** Name of the interconnect resource to query. */ public GetMacsecConfig setInterconnect(java.lang.String interconnect) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_PATTERN.matcher(interconnect).matches(), "Parameter interconnect must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.interconnect = interconnect; return this; } @Override public GetMacsecConfig set(String parameterName, Object value) { return (GetMacsecConfig) super.set(parameterName, value); } } /** * Creates an Interconnect in the specified project using the data included in the request. * * Create a request for the method "interconnects.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Interconnect} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.Interconnect content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/interconnects"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates an Interconnect in the specified project using the data included in the request. * * Create a request for the method "interconnects.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Interconnect} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.Interconnect content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of Interconnects available to the specified project. * * Create a request for the method "interconnects.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/interconnects"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of Interconnects available to the specified project. * * Create a request for the method "interconnects.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InterconnectList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the specified Interconnect with the data included in the request. This method supports * PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "interconnects.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param interconnect Name of the interconnect to update. * @param content the {@link com.google.api.services.compute.model.Interconnect} * @return the request */ public Patch patch(java.lang.String project, java.lang.String interconnect, com.google.api.services.compute.model.Interconnect content) throws java.io.IOException { Patch result = new Patch(project, interconnect, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/interconnects/{interconnect}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern INTERCONNECT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified Interconnect with the data included in the request. This method supports * PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "interconnects.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param interconnect Name of the interconnect to update. * @param content the {@link com.google.api.services.compute.model.Interconnect} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String interconnect, com.google.api.services.compute.model.Interconnect content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.interconnect = com.google.api.client.util.Preconditions.checkNotNull(interconnect, "Required parameter interconnect must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_PATTERN.matcher(interconnect).matches(), "Parameter interconnect must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the interconnect to update. */ @com.google.api.client.util.Key private java.lang.String interconnect; /** Name of the interconnect to update. */ public java.lang.String getInterconnect() { return interconnect; } /** Name of the interconnect to update. */ public Patch setInterconnect(java.lang.String interconnect) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INTERCONNECT_PATTERN.matcher(interconnect).matches(), "Parameter interconnect must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.interconnect = interconnect; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "interconnects.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/interconnects/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "interconnects.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } } /** * An accessor for creating requests from the LicenseCodes collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.LicenseCodes.List request = compute.licenseCodes().list(parameters ...)}
   * 
* * @return the resource collection */ public LicenseCodes licenseCodes() { return new LicenseCodes(); } /** * The "licenseCodes" collection of methods. */ public class LicenseCodes { /** * Return a specified license code. License codes are mirrored across all projects that have * permissions to read the License Code. *Caution* This resource is intended for use only by third- * party partners who are creating Cloud Marketplace images. * * Create a request for the method "licenseCodes.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param licenseCode Number corresponding to the License code resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String licenseCode) throws java.io.IOException { Get result = new Get(project, licenseCode); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/licenseCodes/{licenseCode}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern LICENSE_CODE_PATTERN = java.util.regex.Pattern.compile("[0-9]{0,61}?"); /** * Return a specified license code. License codes are mirrored across all projects that have * permissions to read the License Code. *Caution* This resource is intended for use only by * third-party partners who are creating Cloud Marketplace images. * * Create a request for the method "licenseCodes.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param licenseCode Number corresponding to the License code resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String licenseCode) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.LicenseCode.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.licenseCode = com.google.api.client.util.Preconditions.checkNotNull(licenseCode, "Required parameter licenseCode must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(LICENSE_CODE_PATTERN.matcher(licenseCode).matches(), "Parameter licenseCode must conform to the pattern " + "[0-9]{0,61}?"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Number corresponding to the License code resource to return. */ @com.google.api.client.util.Key private java.lang.String licenseCode; /** Number corresponding to the License code resource to return. */ public java.lang.String getLicenseCode() { return licenseCode; } /** Number corresponding to the License code resource to return. */ public Get setLicenseCode(java.lang.String licenseCode) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(LICENSE_CODE_PATTERN.matcher(licenseCode).matches(), "Parameter licenseCode must conform to the pattern " + "[0-9]{0,61}?"); } this.licenseCode = licenseCode; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. *Caution* This resource is * intended for use only by third-party partners who are creating Cloud Marketplace images. * * Create a request for the method "licenseCodes.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/licenseCodes/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. *Caution* This resource is * intended for use only by third-party partners who are creating Cloud Marketplace images. * * Create a request for the method "licenseCodes.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Licenses collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Licenses.List request = compute.licenses().list(parameters ...)}
   * 
* * @return the resource collection */ public Licenses licenses() { return new Licenses(); } /** * The "licenses" collection of methods. */ public class Licenses { /** * Deletes the specified license. *Caution* This resource is intended for use only by third-party * partners who are creating Cloud Marketplace images. * * Create a request for the method "licenses.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param license Name of the license resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String license) throws java.io.IOException { Delete result = new Delete(project, license); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/licenses/{license}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern LICENSE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified license. *Caution* This resource is intended for use only by third-party * partners who are creating Cloud Marketplace images. * * Create a request for the method "licenses.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param license Name of the license resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String license) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.license = com.google.api.client.util.Preconditions.checkNotNull(license, "Required parameter license must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(LICENSE_PATTERN.matcher(license).matches(), "Parameter license must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the license resource to delete. */ @com.google.api.client.util.Key private java.lang.String license; /** Name of the license resource to delete. */ public java.lang.String getLicense() { return license; } /** Name of the license resource to delete. */ public Delete setLicense(java.lang.String license) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(LICENSE_PATTERN.matcher(license).matches(), "Parameter license must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.license = license; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified License resource. *Caution* This resource is intended for use only by * third-party partners who are creating Cloud Marketplace images. * * Create a request for the method "licenses.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param license Name of the License resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String license) throws java.io.IOException { Get result = new Get(project, license); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/licenses/{license}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern LICENSE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified License resource. *Caution* This resource is intended for use only by * third-party partners who are creating Cloud Marketplace images. * * Create a request for the method "licenses.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param license Name of the License resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String license) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.License.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.license = com.google.api.client.util.Preconditions.checkNotNull(license, "Required parameter license must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(LICENSE_PATTERN.matcher(license).matches(), "Parameter license must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the License resource to return. */ @com.google.api.client.util.Key private java.lang.String license; /** Name of the License resource to return. */ public java.lang.String getLicense() { return license; } /** Name of the License resource to return. */ public Get setLicense(java.lang.String license) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(LICENSE_PATTERN.matcher(license).matches(), "Parameter license must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.license = license; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * *Caution* This resource is intended for use only by third-party partners who are creating Cloud * Marketplace images. * * Create a request for the method "licenses.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/licenses/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. *Caution* This resource is intended for use only by third-party partners who are * creating Cloud Marketplace images. * * Create a request for the method "licenses.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Create a License resource in the specified project. *Caution* This resource is intended for use * only by third-party partners who are creating Cloud Marketplace images. * * Create a request for the method "licenses.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.License} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.License content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/licenses"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Create a License resource in the specified project. *Caution* This resource is intended for use * only by third-party partners who are creating Cloud Marketplace images. * * Create a request for the method "licenses.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.License} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.License content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of licenses available in the specified project. This method does not get any * licenses that belong to other projects, including licenses attached to publicly-available images, * like Debian 9. If you want to get a list of publicly-available licenses, use this method to make * a request to the respective image project, such as debian-cloud or windows-cloud. *Caution* This * resource is intended for use only by third-party partners who are creating Cloud Marketplace * images. * * Create a request for the method "licenses.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/licenses"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of licenses available in the specified project. This method does not get any * licenses that belong to other projects, including licenses attached to publicly-available * images, like Debian 9. If you want to get a list of publicly-available licenses, use this * method to make a request to the respective image project, such as debian-cloud or windows- * cloud. *Caution* This resource is intended for use only by third-party partners who are * creating Cloud Marketplace images. * * Create a request for the method "licenses.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.LicensesListResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. *Caution* * This resource is intended for use only by third-party partners who are creating Cloud Marketplace * images. * * Create a request for the method "licenses.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/licenses/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * *Caution* This resource is intended for use only by third-party partners who are creating Cloud * Marketplace images. * * Create a request for the method "licenses.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. *Caution* This resource is * intended for use only by third-party partners who are creating Cloud Marketplace images. * * Create a request for the method "licenses.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/licenses/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. *Caution* This resource is * intended for use only by third-party partners who are creating Cloud Marketplace images. * * Create a request for the method "licenses.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the MachineImages collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.MachineImages.List request = compute.machineImages().list(parameters ...)}
   * 
* * @return the resource collection */ public MachineImages machineImages() { return new MachineImages(); } /** * The "machineImages" collection of methods. */ public class MachineImages { /** * Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone. * * Create a request for the method "machineImages.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param machineImage The name of the machine image to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String machineImage) throws java.io.IOException { Delete result = new Delete(project, machineImage); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/machineImages/{machineImage}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern MACHINE_IMAGE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified machine image. Deleting a machine image is permanent and cannot be * undone. * * Create a request for the method "machineImages.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param machineImage The name of the machine image to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String machineImage) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.machineImage = com.google.api.client.util.Preconditions.checkNotNull(machineImage, "Required parameter machineImage must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(MACHINE_IMAGE_PATTERN.matcher(machineImage).matches(), "Parameter machineImage must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the machine image to delete. */ @com.google.api.client.util.Key private java.lang.String machineImage; /** The name of the machine image to delete. */ public java.lang.String getMachineImage() { return machineImage; } /** The name of the machine image to delete. */ public Delete setMachineImage(java.lang.String machineImage) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(MACHINE_IMAGE_PATTERN.matcher(machineImage).matches(), "Parameter machineImage must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.machineImage = machineImage; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified machine image. * * Create a request for the method "machineImages.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param machineImage The name of the machine image. * @return the request */ public Get get(java.lang.String project, java.lang.String machineImage) throws java.io.IOException { Get result = new Get(project, machineImage); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/machineImages/{machineImage}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern MACHINE_IMAGE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified machine image. * * Create a request for the method "machineImages.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param machineImage The name of the machine image. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String machineImage) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.MachineImage.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.machineImage = com.google.api.client.util.Preconditions.checkNotNull(machineImage, "Required parameter machineImage must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(MACHINE_IMAGE_PATTERN.matcher(machineImage).matches(), "Parameter machineImage must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the machine image. */ @com.google.api.client.util.Key private java.lang.String machineImage; /** The name of the machine image. */ public java.lang.String getMachineImage() { return machineImage; } /** The name of the machine image. */ public Get setMachineImage(java.lang.String machineImage) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(MACHINE_IMAGE_PATTERN.matcher(machineImage).matches(), "Parameter machineImage must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.machineImage = machineImage; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "machineImages.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/machineImages/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "machineImages.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a machine image in the specified project using the data that is included in the request. * If you are creating a new machine image to update an existing instance, your new machine image * should use the same network or, if applicable, the same subnetwork as the original instance. * * Create a request for the method "machineImages.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.MachineImage} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.MachineImage content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/machineImages"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a machine image in the specified project using the data that is included in the * request. If you are creating a new machine image to update an existing instance, your new * machine image should use the same network or, if applicable, the same subnetwork as the * original instance. * * Create a request for the method "machineImages.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.MachineImage} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.MachineImage content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** Required. Source instance that is used to create the machine image from. */ @com.google.api.client.util.Key private java.lang.String sourceInstance; /** Required. Source instance that is used to create the machine image from. */ public java.lang.String getSourceInstance() { return sourceInstance; } /** Required. Source instance that is used to create the machine image from. */ public Insert setSourceInstance(java.lang.String sourceInstance) { this.sourceInstance = sourceInstance; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of machine images that are contained within the specified project. * * Create a request for the method "machineImages.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/machineImages"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves a list of machine images that are contained within the specified project. * * Create a request for the method "machineImages.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.MachineImageList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "machineImages.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/machineImages/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "machineImages.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "machineImages.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/machineImages/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "machineImages.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the MachineTypes collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.MachineTypes.List request = compute.machineTypes().list(parameters ...)}
   * 
* * @return the resource collection */ public MachineTypes machineTypes() { return new MachineTypes(); } /** * The "machineTypes" collection of methods. */ public class MachineTypes { /** * Retrieves an aggregated list of machine types. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "machineTypes.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/machineTypes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of machine types. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "machineTypes.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.MachineTypeAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Returns the specified machine type. * * Create a request for the method "machineTypes.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param machineType Name of the machine type to return. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String machineType) throws java.io.IOException { Get result = new Get(project, zone, machineType); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/machineTypes/{machineType}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern MACHINE_TYPE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified machine type. * * Create a request for the method "machineTypes.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param machineType Name of the machine type to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String machineType) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.MachineType.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.machineType = com.google.api.client.util.Preconditions.checkNotNull(machineType, "Required parameter machineType must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(MACHINE_TYPE_PATTERN.matcher(machineType).matches(), "Parameter machineType must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the machine type to return. */ @com.google.api.client.util.Key private java.lang.String machineType; /** Name of the machine type to return. */ public java.lang.String getMachineType() { return machineType; } /** Name of the machine type to return. */ public Get setMachineType(java.lang.String machineType) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(MACHINE_TYPE_PATTERN.matcher(machineType).matches(), "Parameter machineType must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.machineType = machineType; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves a list of machine types available to the specified project. * * Create a request for the method "machineTypes.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/machineTypes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of machine types available to the specified project. * * Create a request for the method "machineTypes.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.MachineTypeList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public List setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the NetworkAttachments collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.NetworkAttachments.List request = compute.networkAttachments().list(parameters ...)}
   * 
* * @return the resource collection */ public NetworkAttachments networkAttachments() { return new NetworkAttachments(); } /** * The "networkAttachments" collection of methods. */ public class NetworkAttachments { /** * Retrieves the list of all NetworkAttachment resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the `returnPartialSuccess` * parameter to `true`. * * Create a request for the method "networkAttachments.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/networkAttachments"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of all NetworkAttachment resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the * `returnPartialSuccess` parameter to `true`. * * Create a request for the method "networkAttachments.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NetworkAttachmentAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified NetworkAttachment in the given scope * * Create a request for the method "networkAttachments.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region of this request. * @param networkAttachment Name of the NetworkAttachment resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String networkAttachment) throws java.io.IOException { Delete result = new Delete(project, region, networkAttachment); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NETWORK_ATTACHMENT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified NetworkAttachment in the given scope * * Create a request for the method "networkAttachments.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region of this request. * @param networkAttachment Name of the NetworkAttachment resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String networkAttachment) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.networkAttachment = com.google.api.client.util.Preconditions.checkNotNull(networkAttachment, "Required parameter networkAttachment must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_ATTACHMENT_PATTERN.matcher(networkAttachment).matches(), "Parameter networkAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region of this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region of this request. */ public java.lang.String getRegion() { return region; } /** Name of the region of this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the NetworkAttachment resource to delete. */ @com.google.api.client.util.Key private java.lang.String networkAttachment; /** Name of the NetworkAttachment resource to delete. */ public java.lang.String getNetworkAttachment() { return networkAttachment; } /** Name of the NetworkAttachment resource to delete. */ public Delete setNetworkAttachment(java.lang.String networkAttachment) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_ATTACHMENT_PATTERN.matcher(networkAttachment).matches(), "Parameter networkAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.networkAttachment = networkAttachment; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder */ 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); } } /** * Returns the specified NetworkAttachment resource in the given scope. * * Create a request for the method "networkAttachments.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region of this request. * @param networkAttachment Name of the NetworkAttachment resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String networkAttachment) throws java.io.IOException { Get result = new Get(project, region, networkAttachment); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NETWORK_ATTACHMENT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified NetworkAttachment resource in the given scope. * * Create a request for the method "networkAttachments.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region of this request. * @param networkAttachment Name of the NetworkAttachment resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String networkAttachment) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NetworkAttachment.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.networkAttachment = com.google.api.client.util.Preconditions.checkNotNull(networkAttachment, "Required parameter networkAttachment must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_ATTACHMENT_PATTERN.matcher(networkAttachment).matches(), "Parameter networkAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region of this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region of this request. */ public java.lang.String getRegion() { return region; } /** Name of the region of this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the NetworkAttachment resource to return. */ @com.google.api.client.util.Key private java.lang.String networkAttachment; /** Name of the NetworkAttachment resource to return. */ public java.lang.String getNetworkAttachment() { return networkAttachment; } /** Name of the NetworkAttachment resource to return. */ public Get setNetworkAttachment(java.lang.String networkAttachment) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_ATTACHMENT_PATTERN.matcher(networkAttachment).matches(), "Parameter networkAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.networkAttachment = networkAttachment; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "networkAttachments.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, region, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkAttachments/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "networkAttachments.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public GetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a NetworkAttachment in the specified project in the given scope using the parameters that * are included in the request. * * Create a request for the method "networkAttachments.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region of this request. * @param content the {@link com.google.api.services.compute.model.NetworkAttachment} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.NetworkAttachment content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkAttachments"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a NetworkAttachment in the specified project in the given scope using the parameters * that are included in the request. * * Create a request for the method "networkAttachments.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region of this request. * @param content the {@link com.google.api.services.compute.model.NetworkAttachment} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.NetworkAttachment content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region of this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region of this request. */ public java.lang.String getRegion() { return region; } /** Name of the region of this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists the NetworkAttachments for a project in the given scope. * * Create a request for the method "networkAttachments.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region of this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkAttachments"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Lists the NetworkAttachments for a project in the given scope. * * Create a request for the method "networkAttachments.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region of this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NetworkAttachmentList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region of this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region of this request. */ public java.lang.String getRegion() { return region; } /** Name of the region of this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified NetworkAttachment resource with the data included in the request. This * method supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "networkAttachments.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param networkAttachment Name of the NetworkAttachment resource to patch. * @param content the {@link com.google.api.services.compute.model.NetworkAttachment} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String networkAttachment, com.google.api.services.compute.model.NetworkAttachment content) throws java.io.IOException { Patch result = new Patch(project, region, networkAttachment, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NETWORK_ATTACHMENT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified NetworkAttachment resource with the data included in the request. This * method supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "networkAttachments.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param networkAttachment Name of the NetworkAttachment resource to patch. * @param content the {@link com.google.api.services.compute.model.NetworkAttachment} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String networkAttachment, com.google.api.services.compute.model.NetworkAttachment content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.networkAttachment = com.google.api.client.util.Preconditions.checkNotNull(networkAttachment, "Required parameter networkAttachment must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_ATTACHMENT_PATTERN.matcher(networkAttachment).matches(), "Parameter networkAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the NetworkAttachment resource to patch. */ @com.google.api.client.util.Key private java.lang.String networkAttachment; /** Name of the NetworkAttachment resource to patch. */ public java.lang.String getNetworkAttachment() { return networkAttachment; } /** Name of the NetworkAttachment resource to patch. */ public Patch setNetworkAttachment(java.lang.String networkAttachment) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_ATTACHMENT_PATTERN.matcher(networkAttachment).matches(), "Parameter networkAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.networkAttachment = networkAttachment; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "networkAttachments.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, region, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkAttachments/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "networkAttachments.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public SetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "networkAttachments.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, region, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkAttachments/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "networkAttachments.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public TestIamPermissions setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the NetworkEdgeSecurityServices collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.NetworkEdgeSecurityServices.List request = compute.networkEdgeSecurityServices().list(parameters ...)}
   * 
* * @return the resource collection */ public NetworkEdgeSecurityServices networkEdgeSecurityServices() { return new NetworkEdgeSecurityServices(); } /** * The "networkEdgeSecurityServices" collection of methods. */ public class NetworkEdgeSecurityServices { /** * Retrieves the list of all NetworkEdgeSecurityService resources available to the specified * project. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter * to `true`. * * Create a request for the method "networkEdgeSecurityServices.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Name of the project scoping this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/networkEdgeSecurityServices"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of all NetworkEdgeSecurityService resources available to the specified * project. To prevent failure, Google recommends that you set the `returnPartialSuccess` * parameter to `true`. * * Create a request for the method "networkEdgeSecurityServices.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Name of the project scoping this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NetworkEdgeSecurityServiceAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Name of the project scoping this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Name of the project scoping this request. */ public java.lang.String getProject() { return project; } /** Name of the project scoping this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified service. * * Create a request for the method "networkEdgeSecurityServices.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param networkEdgeSecurityService Name of the network edge security service to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String networkEdgeSecurityService) throws java.io.IOException { Delete result = new Delete(project, region, networkEdgeSecurityService); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NETWORK_EDGE_SECURITY_SERVICE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified service. * * Create a request for the method "networkEdgeSecurityServices.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param networkEdgeSecurityService Name of the network edge security service to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String networkEdgeSecurityService) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.networkEdgeSecurityService = com.google.api.client.util.Preconditions.checkNotNull(networkEdgeSecurityService, "Required parameter networkEdgeSecurityService must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_EDGE_SECURITY_SERVICE_PATTERN.matcher(networkEdgeSecurityService).matches(), "Parameter networkEdgeSecurityService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the network edge security service to delete. */ @com.google.api.client.util.Key private java.lang.String networkEdgeSecurityService; /** Name of the network edge security service to delete. */ public java.lang.String getNetworkEdgeSecurityService() { return networkEdgeSecurityService; } /** Name of the network edge security service to delete. */ public Delete setNetworkEdgeSecurityService(java.lang.String networkEdgeSecurityService) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_EDGE_SECURITY_SERVICE_PATTERN.matcher(networkEdgeSecurityService).matches(), "Parameter networkEdgeSecurityService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.networkEdgeSecurityService = networkEdgeSecurityService; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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 a specified NetworkEdgeSecurityService. * * Create a request for the method "networkEdgeSecurityServices.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param networkEdgeSecurityService Name of the network edge security service to get. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String networkEdgeSecurityService) throws java.io.IOException { Get result = new Get(project, region, networkEdgeSecurityService); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NETWORK_EDGE_SECURITY_SERVICE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets a specified NetworkEdgeSecurityService. * * Create a request for the method "networkEdgeSecurityServices.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param networkEdgeSecurityService Name of the network edge security service to get. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String networkEdgeSecurityService) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NetworkEdgeSecurityService.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.networkEdgeSecurityService = com.google.api.client.util.Preconditions.checkNotNull(networkEdgeSecurityService, "Required parameter networkEdgeSecurityService must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_EDGE_SECURITY_SERVICE_PATTERN.matcher(networkEdgeSecurityService).matches(), "Parameter networkEdgeSecurityService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the network edge security service to get. */ @com.google.api.client.util.Key private java.lang.String networkEdgeSecurityService; /** Name of the network edge security service to get. */ public java.lang.String getNetworkEdgeSecurityService() { return networkEdgeSecurityService; } /** Name of the network edge security service to get. */ public Get setNetworkEdgeSecurityService(java.lang.String networkEdgeSecurityService) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_EDGE_SECURITY_SERVICE_PATTERN.matcher(networkEdgeSecurityService).matches(), "Parameter networkEdgeSecurityService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.networkEdgeSecurityService = networkEdgeSecurityService; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a new service in the specified project using the data included in the request. * * Create a request for the method "networkEdgeSecurityServices.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.NetworkEdgeSecurityService} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.NetworkEdgeSecurityService content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkEdgeSecurityServices"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a new service in the specified project using the data included in the request. * * Create a request for the method "networkEdgeSecurityServices.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.NetworkEdgeSecurityService} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.NetworkEdgeSecurityService content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** If true, the request will not be committed. */ @com.google.api.client.util.Key private java.lang.Boolean validateOnly; /** If true, the request will not be committed. */ public java.lang.Boolean getValidateOnly() { return validateOnly; } /** If true, the request will not be committed. */ public Insert setValidateOnly(java.lang.Boolean validateOnly) { this.validateOnly = validateOnly; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Patches the specified policy with the data included in the request. * * Create a request for the method "networkEdgeSecurityServices.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param networkEdgeSecurityService Name of the network edge security service to update. * @param content the {@link com.google.api.services.compute.model.NetworkEdgeSecurityService} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String networkEdgeSecurityService, com.google.api.services.compute.model.NetworkEdgeSecurityService content) throws java.io.IOException { Patch result = new Patch(project, region, networkEdgeSecurityService, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NETWORK_EDGE_SECURITY_SERVICE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified policy with the data included in the request. * * Create a request for the method "networkEdgeSecurityServices.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param networkEdgeSecurityService Name of the network edge security service to update. * @param content the {@link com.google.api.services.compute.model.NetworkEdgeSecurityService} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String networkEdgeSecurityService, com.google.api.services.compute.model.NetworkEdgeSecurityService content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.networkEdgeSecurityService = com.google.api.client.util.Preconditions.checkNotNull(networkEdgeSecurityService, "Required parameter networkEdgeSecurityService must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_EDGE_SECURITY_SERVICE_PATTERN.matcher(networkEdgeSecurityService).matches(), "Parameter networkEdgeSecurityService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the network edge security service to update. */ @com.google.api.client.util.Key private java.lang.String networkEdgeSecurityService; /** Name of the network edge security service to update. */ public java.lang.String getNetworkEdgeSecurityService() { return networkEdgeSecurityService; } /** Name of the network edge security service to update. */ public Patch setNetworkEdgeSecurityService(java.lang.String networkEdgeSecurityService) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_EDGE_SECURITY_SERVICE_PATTERN.matcher(networkEdgeSecurityService).matches(), "Parameter networkEdgeSecurityService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.networkEdgeSecurityService = networkEdgeSecurityService; return this; } @com.google.api.client.util.Key private java.util.List paths; /** */ public java.util.List getPaths() { return paths; } public Patch setPaths(java.util.List paths) { this.paths = paths; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** Indicates fields to be updated as part of this request. */ @com.google.api.client.util.Key private String updateMask; /** Indicates fields to be updated as part of this request. */ public String getUpdateMask() { return updateMask; } /** Indicates fields to be updated as part of this request. */ public Patch setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } } /** * An accessor for creating requests from the NetworkEndpointGroups collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.NetworkEndpointGroups.List request = compute.networkEndpointGroups().list(parameters ...)}
   * 
* * @return the resource collection */ public NetworkEndpointGroups networkEndpointGroups() { return new NetworkEndpointGroups(); } /** * The "networkEndpointGroups" collection of methods. */ public class NetworkEndpointGroups { /** * Retrieves the list of network endpoint groups and sorts them by zone. To prevent failure, Google * recommends that you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "networkEndpointGroups.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/networkEndpointGroups"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of network endpoint groups and sorts them by zone. To prevent failure, * Google recommends that you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "networkEndpointGroups.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NetworkEndpointGroupAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Attach a list of network endpoints to the specified network endpoint group. * * Create a request for the method "networkEndpointGroups.attachNetworkEndpoints". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AttachNetworkEndpoints#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group where you are attaching network endpoints to. It should * comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.NetworkEndpointGroupsAttachEndpointsRequest} * @return the request */ public AttachNetworkEndpoints attachNetworkEndpoints(java.lang.String project, java.lang.String zone, java.lang.String networkEndpointGroup, com.google.api.services.compute.model.NetworkEndpointGroupsAttachEndpointsRequest content) throws java.io.IOException { AttachNetworkEndpoints result = new AttachNetworkEndpoints(project, zone, networkEndpointGroup, content); initialize(result); return result; } public class AttachNetworkEndpoints extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Attach a list of network endpoints to the specified network endpoint group. * * Create a request for the method "networkEndpointGroups.attachNetworkEndpoints". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AttachNetworkEndpoints#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group where you are attaching network endpoints to. It should * comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.NetworkEndpointGroupsAttachEndpointsRequest} * @since 1.13 */ protected AttachNetworkEndpoints(java.lang.String project, java.lang.String zone, java.lang.String networkEndpointGroup, com.google.api.services.compute.model.NetworkEndpointGroupsAttachEndpointsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.networkEndpointGroup = com.google.api.client.util.Preconditions.checkNotNull(networkEndpointGroup, "Required parameter networkEndpointGroup must be specified."); } @Override public AttachNetworkEndpoints set$Xgafv(java.lang.String $Xgafv) { return (AttachNetworkEndpoints) super.set$Xgafv($Xgafv); } @Override public AttachNetworkEndpoints setAccessToken(java.lang.String accessToken) { return (AttachNetworkEndpoints) super.setAccessToken(accessToken); } @Override public AttachNetworkEndpoints setAlt(java.lang.String alt) { return (AttachNetworkEndpoints) super.setAlt(alt); } @Override public AttachNetworkEndpoints setCallback(java.lang.String callback) { return (AttachNetworkEndpoints) super.setCallback(callback); } @Override public AttachNetworkEndpoints setFields(java.lang.String fields) { return (AttachNetworkEndpoints) super.setFields(fields); } @Override public AttachNetworkEndpoints setKey(java.lang.String key) { return (AttachNetworkEndpoints) super.setKey(key); } @Override public AttachNetworkEndpoints setOauthToken(java.lang.String oauthToken) { return (AttachNetworkEndpoints) super.setOauthToken(oauthToken); } @Override public AttachNetworkEndpoints setPrettyPrint(java.lang.Boolean prettyPrint) { return (AttachNetworkEndpoints) super.setPrettyPrint(prettyPrint); } @Override public AttachNetworkEndpoints setQuotaUser(java.lang.String quotaUser) { return (AttachNetworkEndpoints) super.setQuotaUser(quotaUser); } @Override public AttachNetworkEndpoints setUploadType(java.lang.String uploadType) { return (AttachNetworkEndpoints) super.setUploadType(uploadType); } @Override public AttachNetworkEndpoints setUploadProtocol(java.lang.String uploadProtocol) { return (AttachNetworkEndpoints) super.setUploadProtocol(uploadProtocol); } @Override public AttachNetworkEndpoints setUserIp(java.lang.String userIp) { return (AttachNetworkEndpoints) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AttachNetworkEndpoints setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the network endpoint group is located. It should comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the network endpoint group is located. It should comply with RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the network endpoint group is located. It should comply with * RFC1035. */ public AttachNetworkEndpoints setZone(java.lang.String zone) { this.zone = zone; return this; } /** * The name of the network endpoint group where you are attaching network endpoints to. It * should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String networkEndpointGroup; /** The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035. */ public java.lang.String getNetworkEndpointGroup() { return networkEndpointGroup; } /** * The name of the network endpoint group where you are attaching network endpoints to. It * should comply with RFC1035. */ public AttachNetworkEndpoints setNetworkEndpointGroup(java.lang.String networkEndpointGroup) { this.networkEndpointGroup = networkEndpointGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AttachNetworkEndpoints setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AttachNetworkEndpoints set(String parameterName, Object value) { return (AttachNetworkEndpoints) super.set(parameterName, value); } } /** * Deletes the specified network endpoint group. The network endpoints in the NEG and the VM * instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be * deleted if there are backend services referencing it. * * Create a request for the method "networkEndpointGroups.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group to delete. It should comply with RFC1035. * @return the request */ public Delete delete(java.lang.String project, java.lang.String zone, java.lang.String networkEndpointGroup) throws java.io.IOException { Delete result = new Delete(project, zone, networkEndpointGroup); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Deletes the specified network endpoint group. The network endpoints in the NEG and the VM * instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot * be deleted if there are backend services referencing it. * * Create a request for the method "networkEndpointGroups.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group to delete. It should comply with RFC1035. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String zone, java.lang.String networkEndpointGroup) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.networkEndpointGroup = com.google.api.client.util.Preconditions.checkNotNull(networkEndpointGroup, "Required parameter networkEndpointGroup must be specified."); } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the network endpoint group is located. It should comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the network endpoint group is located. It should comply with RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the network endpoint group is located. It should comply with * RFC1035. */ public Delete setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the network endpoint group to delete. It should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String networkEndpointGroup; /** The name of the network endpoint group to delete. It should comply with RFC1035. */ public java.lang.String getNetworkEndpointGroup() { return networkEndpointGroup; } /** The name of the network endpoint group to delete. It should comply with RFC1035. */ public Delete setNetworkEndpointGroup(java.lang.String networkEndpointGroup) { this.networkEndpointGroup = networkEndpointGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Detach a list of network endpoints from the specified network endpoint group. * * Create a request for the method "networkEndpointGroups.detachNetworkEndpoints". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link DetachNetworkEndpoints#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group where you are removing network endpoints. It should comply * with RFC1035. * @param content the {@link com.google.api.services.compute.model.NetworkEndpointGroupsDetachEndpointsRequest} * @return the request */ public DetachNetworkEndpoints detachNetworkEndpoints(java.lang.String project, java.lang.String zone, java.lang.String networkEndpointGroup, com.google.api.services.compute.model.NetworkEndpointGroupsDetachEndpointsRequest content) throws java.io.IOException { DetachNetworkEndpoints result = new DetachNetworkEndpoints(project, zone, networkEndpointGroup, content); initialize(result); return result; } public class DetachNetworkEndpoints extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Detach a list of network endpoints from the specified network endpoint group. * * Create a request for the method "networkEndpointGroups.detachNetworkEndpoints". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link DetachNetworkEndpoints#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group where you are removing network endpoints. It should comply * with RFC1035. * @param content the {@link com.google.api.services.compute.model.NetworkEndpointGroupsDetachEndpointsRequest} * @since 1.13 */ protected DetachNetworkEndpoints(java.lang.String project, java.lang.String zone, java.lang.String networkEndpointGroup, com.google.api.services.compute.model.NetworkEndpointGroupsDetachEndpointsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.networkEndpointGroup = com.google.api.client.util.Preconditions.checkNotNull(networkEndpointGroup, "Required parameter networkEndpointGroup must be specified."); } @Override public DetachNetworkEndpoints set$Xgafv(java.lang.String $Xgafv) { return (DetachNetworkEndpoints) super.set$Xgafv($Xgafv); } @Override public DetachNetworkEndpoints setAccessToken(java.lang.String accessToken) { return (DetachNetworkEndpoints) super.setAccessToken(accessToken); } @Override public DetachNetworkEndpoints setAlt(java.lang.String alt) { return (DetachNetworkEndpoints) super.setAlt(alt); } @Override public DetachNetworkEndpoints setCallback(java.lang.String callback) { return (DetachNetworkEndpoints) super.setCallback(callback); } @Override public DetachNetworkEndpoints setFields(java.lang.String fields) { return (DetachNetworkEndpoints) super.setFields(fields); } @Override public DetachNetworkEndpoints setKey(java.lang.String key) { return (DetachNetworkEndpoints) super.setKey(key); } @Override public DetachNetworkEndpoints setOauthToken(java.lang.String oauthToken) { return (DetachNetworkEndpoints) super.setOauthToken(oauthToken); } @Override public DetachNetworkEndpoints setPrettyPrint(java.lang.Boolean prettyPrint) { return (DetachNetworkEndpoints) super.setPrettyPrint(prettyPrint); } @Override public DetachNetworkEndpoints setQuotaUser(java.lang.String quotaUser) { return (DetachNetworkEndpoints) super.setQuotaUser(quotaUser); } @Override public DetachNetworkEndpoints setUploadType(java.lang.String uploadType) { return (DetachNetworkEndpoints) super.setUploadType(uploadType); } @Override public DetachNetworkEndpoints setUploadProtocol(java.lang.String uploadProtocol) { return (DetachNetworkEndpoints) super.setUploadProtocol(uploadProtocol); } @Override public DetachNetworkEndpoints setUserIp(java.lang.String userIp) { return (DetachNetworkEndpoints) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public DetachNetworkEndpoints setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the network endpoint group is located. It should comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the network endpoint group is located. It should comply with RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the network endpoint group is located. It should comply with * RFC1035. */ public DetachNetworkEndpoints setZone(java.lang.String zone) { this.zone = zone; return this; } /** * The name of the network endpoint group where you are removing network endpoints. It should * comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String networkEndpointGroup; /** The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035. */ public java.lang.String getNetworkEndpointGroup() { return networkEndpointGroup; } /** * The name of the network endpoint group where you are removing network endpoints. It should * comply with RFC1035. */ public DetachNetworkEndpoints setNetworkEndpointGroup(java.lang.String networkEndpointGroup) { this.networkEndpointGroup = networkEndpointGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public DetachNetworkEndpoints setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public DetachNetworkEndpoints set(String parameterName, Object value) { return (DetachNetworkEndpoints) super.set(parameterName, value); } } /** * Returns the specified network endpoint group. * * Create a request for the method "networkEndpointGroups.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group. It should comply with RFC1035. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String networkEndpointGroup) throws java.io.IOException { Get result = new Get(project, zone, networkEndpointGroup); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Returns the specified network endpoint group. * * Create a request for the method "networkEndpointGroups.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group. It should comply with RFC1035. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String networkEndpointGroup) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NetworkEndpointGroup.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.networkEndpointGroup = com.google.api.client.util.Preconditions.checkNotNull(networkEndpointGroup, "Required parameter networkEndpointGroup must be specified."); } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the network endpoint group is located. It should comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the network endpoint group is located. It should comply with RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the network endpoint group is located. It should comply with * RFC1035. */ public Get setZone(java.lang.String zone) { this.zone = zone; return this; } /** The name of the network endpoint group. It should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String networkEndpointGroup; /** The name of the network endpoint group. It should comply with RFC1035. */ public java.lang.String getNetworkEndpointGroup() { return networkEndpointGroup; } /** The name of the network endpoint group. It should comply with RFC1035. */ public Get setNetworkEndpointGroup(java.lang.String networkEndpointGroup) { this.networkEndpointGroup = networkEndpointGroup; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a network endpoint group in the specified project using the parameters that are included * in the request. * * Create a request for the method "networkEndpointGroups.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where you want to create the network endpoint group. It should comply with * RFC1035. * @param content the {@link com.google.api.services.compute.model.NetworkEndpointGroup} * @return the request */ public Insert insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.NetworkEndpointGroup content) throws java.io.IOException { Insert result = new Insert(project, zone, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/networkEndpointGroups"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a network endpoint group in the specified project using the parameters that are * included in the request. * * Create a request for the method "networkEndpointGroups.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where you want to create the network endpoint group. It should comply with * RFC1035. * @param content the {@link com.google.api.services.compute.model.NetworkEndpointGroup} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.NetworkEndpointGroup content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where you want to create the network endpoint group. It should comply * with RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where you want to create the network endpoint group. It should comply with RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where you want to create the network endpoint group. It should comply * with RFC1035. */ public Insert setZone(java.lang.String zone) { this.zone = zone; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of network endpoint groups that are located in the specified project and zone. * * Create a request for the method "networkEndpointGroups.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone where the network endpoint group is located. It should comply with RFC1035. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/networkEndpointGroups"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of network endpoint groups that are located in the specified project and * zone. * * Create a request for the method "networkEndpointGroups.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone where the network endpoint group is located. It should comply with RFC1035. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NetworkEndpointGroupList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the network endpoint group is located. It should comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the network endpoint group is located. It should comply with RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the network endpoint group is located. It should comply with * RFC1035. */ public List setZone(java.lang.String zone) { this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Lists the network endpoints in the specified network endpoint group. * * Create a request for the method "networkEndpointGroups.listNetworkEndpoints". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListNetworkEndpoints#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group from which you want to generate a list of included network * endpoints. It should comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.NetworkEndpointGroupsListEndpointsRequest} * @return the request */ public ListNetworkEndpoints listNetworkEndpoints(java.lang.String project, java.lang.String zone, java.lang.String networkEndpointGroup, com.google.api.services.compute.model.NetworkEndpointGroupsListEndpointsRequest content) throws java.io.IOException { ListNetworkEndpoints result = new ListNetworkEndpoints(project, zone, networkEndpointGroup, content); initialize(result); return result; } public class ListNetworkEndpoints extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists the network endpoints in the specified network endpoint group. * * Create a request for the method "networkEndpointGroups.listNetworkEndpoints". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListNetworkEndpoints#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group from which you want to generate a list of included network * endpoints. It should comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.NetworkEndpointGroupsListEndpointsRequest} * @since 1.13 */ protected ListNetworkEndpoints(java.lang.String project, java.lang.String zone, java.lang.String networkEndpointGroup, com.google.api.services.compute.model.NetworkEndpointGroupsListEndpointsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.NetworkEndpointGroupsListNetworkEndpoints.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); this.networkEndpointGroup = com.google.api.client.util.Preconditions.checkNotNull(networkEndpointGroup, "Required parameter networkEndpointGroup must be specified."); } @Override public ListNetworkEndpoints set$Xgafv(java.lang.String $Xgafv) { return (ListNetworkEndpoints) super.set$Xgafv($Xgafv); } @Override public ListNetworkEndpoints setAccessToken(java.lang.String accessToken) { return (ListNetworkEndpoints) super.setAccessToken(accessToken); } @Override public ListNetworkEndpoints setAlt(java.lang.String alt) { return (ListNetworkEndpoints) super.setAlt(alt); } @Override public ListNetworkEndpoints setCallback(java.lang.String callback) { return (ListNetworkEndpoints) super.setCallback(callback); } @Override public ListNetworkEndpoints setFields(java.lang.String fields) { return (ListNetworkEndpoints) super.setFields(fields); } @Override public ListNetworkEndpoints setKey(java.lang.String key) { return (ListNetworkEndpoints) super.setKey(key); } @Override public ListNetworkEndpoints setOauthToken(java.lang.String oauthToken) { return (ListNetworkEndpoints) super.setOauthToken(oauthToken); } @Override public ListNetworkEndpoints setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListNetworkEndpoints) super.setPrettyPrint(prettyPrint); } @Override public ListNetworkEndpoints setQuotaUser(java.lang.String quotaUser) { return (ListNetworkEndpoints) super.setQuotaUser(quotaUser); } @Override public ListNetworkEndpoints setUploadType(java.lang.String uploadType) { return (ListNetworkEndpoints) super.setUploadType(uploadType); } @Override public ListNetworkEndpoints setUploadProtocol(java.lang.String uploadProtocol) { return (ListNetworkEndpoints) super.setUploadProtocol(uploadProtocol); } @Override public ListNetworkEndpoints setUserIp(java.lang.String userIp) { return (ListNetworkEndpoints) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListNetworkEndpoints setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the zone where the network endpoint group is located. It should comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone where the network endpoint group is located. It should comply with RFC1035. */ public java.lang.String getZone() { return zone; } /** * The name of the zone where the network endpoint group is located. It should comply with * RFC1035. */ public ListNetworkEndpoints setZone(java.lang.String zone) { this.zone = zone; return this; } /** * The name of the network endpoint group from which you want to generate a list of included * network endpoints. It should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String networkEndpointGroup; /** The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035. */ public java.lang.String getNetworkEndpointGroup() { return networkEndpointGroup; } /** * The name of the network endpoint group from which you want to generate a list of included * network endpoints. It should comply with RFC1035. */ public ListNetworkEndpoints setNetworkEndpointGroup(java.lang.String networkEndpointGroup) { this.networkEndpointGroup = networkEndpointGroup; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListNetworkEndpoints setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListNetworkEndpoints setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListNetworkEndpoints setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListNetworkEndpoints setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListNetworkEndpoints setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListNetworkEndpoints set(String parameterName, Object value) { return (ListNetworkEndpoints) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "networkEndpointGroups.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, zone, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "networkEndpointGroups.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public TestIamPermissions setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the NetworkFirewallPolicies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.NetworkFirewallPolicies.List request = compute.networkFirewallPolicies().list(parameters ...)}
   * 
* * @return the resource collection */ public NetworkFirewallPolicies networkFirewallPolicies() { return new NetworkFirewallPolicies(); } /** * The "networkFirewallPolicies" collection of methods. */ public class NetworkFirewallPolicies { /** * Inserts an association for the specified firewall policy. * * Create a request for the method "networkFirewallPolicies.addAssociation". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddAssociation#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyAssociation} * @return the request */ public AddAssociation addAssociation(java.lang.String project, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyAssociation content) throws java.io.IOException { AddAssociation result = new AddAssociation(project, firewallPolicy, content); initialize(result); return result; } public class AddAssociation extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies/{firewallPolicy}/addAssociation"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Inserts an association for the specified firewall policy. * * Create a request for the method "networkFirewallPolicies.addAssociation". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddAssociation#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyAssociation} * @since 1.13 */ protected AddAssociation(java.lang.String project, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyAssociation content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public AddAssociation set$Xgafv(java.lang.String $Xgafv) { return (AddAssociation) super.set$Xgafv($Xgafv); } @Override public AddAssociation setAccessToken(java.lang.String accessToken) { return (AddAssociation) super.setAccessToken(accessToken); } @Override public AddAssociation setAlt(java.lang.String alt) { return (AddAssociation) super.setAlt(alt); } @Override public AddAssociation setCallback(java.lang.String callback) { return (AddAssociation) super.setCallback(callback); } @Override public AddAssociation setFields(java.lang.String fields) { return (AddAssociation) super.setFields(fields); } @Override public AddAssociation setKey(java.lang.String key) { return (AddAssociation) super.setKey(key); } @Override public AddAssociation setOauthToken(java.lang.String oauthToken) { return (AddAssociation) super.setOauthToken(oauthToken); } @Override public AddAssociation setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddAssociation) super.setPrettyPrint(prettyPrint); } @Override public AddAssociation setQuotaUser(java.lang.String quotaUser) { return (AddAssociation) super.setQuotaUser(quotaUser); } @Override public AddAssociation setUploadType(java.lang.String uploadType) { return (AddAssociation) super.setUploadType(uploadType); } @Override public AddAssociation setUploadProtocol(java.lang.String uploadProtocol) { return (AddAssociation) super.setUploadProtocol(uploadProtocol); } @Override public AddAssociation setUserIp(java.lang.String userIp) { return (AddAssociation) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddAssociation setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public AddAssociation setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** * Indicates whether or not to replace it if an association of the attachment already exists. * This is false by default, in which case an error will be returned if an association already * exists. */ @com.google.api.client.util.Key private java.lang.Boolean replaceExistingAssociation; /** Indicates whether or not to replace it if an association of the attachment already exists. This is false by default, in which case an error will be returned if an association already exists. */ public java.lang.Boolean getReplaceExistingAssociation() { return replaceExistingAssociation; } /** * Indicates whether or not to replace it if an association of the attachment already exists. * This is false by default, in which case an error will be returned if an association already * exists. */ public AddAssociation setReplaceExistingAssociation(java.lang.Boolean replaceExistingAssociation) { this.replaceExistingAssociation = replaceExistingAssociation; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddAssociation setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddAssociation set(String parameterName, Object value) { return (AddAssociation) super.set(parameterName, value); } } /** * Inserts a rule into a firewall policy. * * Create a request for the method "networkFirewallPolicies.addRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyRule} * @return the request */ public AddRule addRule(java.lang.String project, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyRule content) throws java.io.IOException { AddRule result = new AddRule(project, firewallPolicy, content); initialize(result); return result; } public class AddRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies/{firewallPolicy}/addRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Inserts a rule into a firewall policy. * * Create a request for the method "networkFirewallPolicies.addRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyRule} * @since 1.13 */ protected AddRule(java.lang.String project, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyRule content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public AddRule set$Xgafv(java.lang.String $Xgafv) { return (AddRule) super.set$Xgafv($Xgafv); } @Override public AddRule setAccessToken(java.lang.String accessToken) { return (AddRule) super.setAccessToken(accessToken); } @Override public AddRule setAlt(java.lang.String alt) { return (AddRule) super.setAlt(alt); } @Override public AddRule setCallback(java.lang.String callback) { return (AddRule) super.setCallback(callback); } @Override public AddRule setFields(java.lang.String fields) { return (AddRule) super.setFields(fields); } @Override public AddRule setKey(java.lang.String key) { return (AddRule) super.setKey(key); } @Override public AddRule setOauthToken(java.lang.String oauthToken) { return (AddRule) super.setOauthToken(oauthToken); } @Override public AddRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddRule) super.setPrettyPrint(prettyPrint); } @Override public AddRule setQuotaUser(java.lang.String quotaUser) { return (AddRule) super.setQuotaUser(quotaUser); } @Override public AddRule setUploadType(java.lang.String uploadType) { return (AddRule) super.setUploadType(uploadType); } @Override public AddRule setUploadProtocol(java.lang.String uploadProtocol) { return (AddRule) super.setUploadProtocol(uploadProtocol); } @Override public AddRule setUserIp(java.lang.String userIp) { return (AddRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public AddRule setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** * When rule.priority is not specified, auto choose a unused priority between minPriority and * maxPriority>. This field is exclusive with rule.priority. */ @com.google.api.client.util.Key private java.lang.Integer maxPriority; /** When rule.priority is not specified, auto choose a unused priority between minPriority and maxPriority>. This field is exclusive with rule.priority. */ public java.lang.Integer getMaxPriority() { return maxPriority; } /** * When rule.priority is not specified, auto choose a unused priority between minPriority and * maxPriority>. This field is exclusive with rule.priority. */ public AddRule setMaxPriority(java.lang.Integer maxPriority) { this.maxPriority = maxPriority; return this; } /** * When rule.priority is not specified, auto choose a unused priority between minPriority and * maxPriority>. This field is exclusive with rule.priority. */ @com.google.api.client.util.Key private java.lang.Integer minPriority; /** When rule.priority is not specified, auto choose a unused priority between minPriority and maxPriority>. This field is exclusive with rule.priority. */ public java.lang.Integer getMinPriority() { return minPriority; } /** * When rule.priority is not specified, auto choose a unused priority between minPriority and * maxPriority>. This field is exclusive with rule.priority. */ public AddRule setMinPriority(java.lang.Integer minPriority) { this.minPriority = minPriority; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddRule setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddRule set(String parameterName, Object value) { return (AddRule) super.set(parameterName, value); } } /** * Copies rules to the specified firewall policy. * * Create a request for the method "networkFirewallPolicies.cloneRules". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link CloneRules#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to update. * @return the request */ public CloneRules cloneRules(java.lang.String project, java.lang.String firewallPolicy) throws java.io.IOException { CloneRules result = new CloneRules(project, firewallPolicy); initialize(result); return result; } public class CloneRules extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies/{firewallPolicy}/cloneRules"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Copies rules to the specified firewall policy. * * Create a request for the method "networkFirewallPolicies.cloneRules". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link CloneRules#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to update. * @since 1.13 */ protected CloneRules(java.lang.String project, java.lang.String firewallPolicy) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public CloneRules set$Xgafv(java.lang.String $Xgafv) { return (CloneRules) super.set$Xgafv($Xgafv); } @Override public CloneRules setAccessToken(java.lang.String accessToken) { return (CloneRules) super.setAccessToken(accessToken); } @Override public CloneRules setAlt(java.lang.String alt) { return (CloneRules) super.setAlt(alt); } @Override public CloneRules setCallback(java.lang.String callback) { return (CloneRules) super.setCallback(callback); } @Override public CloneRules setFields(java.lang.String fields) { return (CloneRules) super.setFields(fields); } @Override public CloneRules setKey(java.lang.String key) { return (CloneRules) super.setKey(key); } @Override public CloneRules setOauthToken(java.lang.String oauthToken) { return (CloneRules) super.setOauthToken(oauthToken); } @Override public CloneRules setPrettyPrint(java.lang.Boolean prettyPrint) { return (CloneRules) super.setPrettyPrint(prettyPrint); } @Override public CloneRules setQuotaUser(java.lang.String quotaUser) { return (CloneRules) super.setQuotaUser(quotaUser); } @Override public CloneRules setUploadType(java.lang.String uploadType) { return (CloneRules) super.setUploadType(uploadType); } @Override public CloneRules setUploadProtocol(java.lang.String uploadProtocol) { return (CloneRules) super.setUploadProtocol(uploadProtocol); } @Override public CloneRules setUserIp(java.lang.String userIp) { return (CloneRules) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public CloneRules setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public CloneRules setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public CloneRules setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** The firewall policy from which to copy rules. */ @com.google.api.client.util.Key private java.lang.String sourceFirewallPolicy; /** The firewall policy from which to copy rules. */ public java.lang.String getSourceFirewallPolicy() { return sourceFirewallPolicy; } /** The firewall policy from which to copy rules. */ public CloneRules setSourceFirewallPolicy(java.lang.String sourceFirewallPolicy) { this.sourceFirewallPolicy = sourceFirewallPolicy; return this; } @Override public CloneRules set(String parameterName, Object value) { return (CloneRules) super.set(parameterName, value); } } /** * Deletes the specified policy. * * Create a request for the method "networkFirewallPolicies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String firewallPolicy) throws java.io.IOException { Delete result = new Delete(project, firewallPolicy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies/{firewallPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified policy. * * Create a request for the method "networkFirewallPolicies.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param firewallPolicy Name of the firewall policy to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String firewallPolicy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the firewall policy to delete. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to delete. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to delete. */ public Delete setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified network firewall policy. * * Create a request for the method "networkFirewallPolicies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to get. * @return the request */ public Get get(java.lang.String project, java.lang.String firewallPolicy) throws java.io.IOException { Get result = new Get(project, firewallPolicy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies/{firewallPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified network firewall policy. * * Create a request for the method "networkFirewallPolicies.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param firewallPolicy Name of the firewall policy to get. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String firewallPolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FirewallPolicy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the firewall policy to get. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to get. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to get. */ public Get setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets an association with the specified name. * * Create a request for the method "networkFirewallPolicies.getAssociation". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetAssociation#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to which the queried association belongs. * @return the request */ public GetAssociation getAssociation(java.lang.String project, java.lang.String firewallPolicy) throws java.io.IOException { GetAssociation result = new GetAssociation(project, firewallPolicy); initialize(result); return result; } public class GetAssociation extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies/{firewallPolicy}/getAssociation"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets an association with the specified name. * * Create a request for the method "networkFirewallPolicies.getAssociation". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetAssociation#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to which the queried association belongs. * @since 1.13 */ protected GetAssociation(java.lang.String project, java.lang.String firewallPolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FirewallPolicyAssociation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetAssociation set$Xgafv(java.lang.String $Xgafv) { return (GetAssociation) super.set$Xgafv($Xgafv); } @Override public GetAssociation setAccessToken(java.lang.String accessToken) { return (GetAssociation) super.setAccessToken(accessToken); } @Override public GetAssociation setAlt(java.lang.String alt) { return (GetAssociation) super.setAlt(alt); } @Override public GetAssociation setCallback(java.lang.String callback) { return (GetAssociation) super.setCallback(callback); } @Override public GetAssociation setFields(java.lang.String fields) { return (GetAssociation) super.setFields(fields); } @Override public GetAssociation setKey(java.lang.String key) { return (GetAssociation) super.setKey(key); } @Override public GetAssociation setOauthToken(java.lang.String oauthToken) { return (GetAssociation) super.setOauthToken(oauthToken); } @Override public GetAssociation setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetAssociation) super.setPrettyPrint(prettyPrint); } @Override public GetAssociation setQuotaUser(java.lang.String quotaUser) { return (GetAssociation) super.setQuotaUser(quotaUser); } @Override public GetAssociation setUploadType(java.lang.String uploadType) { return (GetAssociation) super.setUploadType(uploadType); } @Override public GetAssociation setUploadProtocol(java.lang.String uploadProtocol) { return (GetAssociation) super.setUploadProtocol(uploadProtocol); } @Override public GetAssociation setUserIp(java.lang.String userIp) { return (GetAssociation) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetAssociation setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the firewall policy to which the queried association belongs. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to which the queried association belongs. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to which the queried association belongs. */ public GetAssociation setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** The name of the association to get from the firewall policy. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the association to get from the firewall policy. */ public java.lang.String getName() { return name; } /** The name of the association to get from the firewall policy. */ public GetAssociation setName(java.lang.String name) { this.name = name; return this; } @Override public GetAssociation set(String parameterName, Object value) { return (GetAssociation) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "networkFirewallPolicies.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "networkFirewallPolicies.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Gets a rule of the specified priority. * * Create a request for the method "networkFirewallPolicies.getRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to which the queried rule belongs. * @return the request */ public GetRule getRule(java.lang.String project, java.lang.String firewallPolicy) throws java.io.IOException { GetRule result = new GetRule(project, firewallPolicy); initialize(result); return result; } public class GetRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies/{firewallPolicy}/getRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets a rule of the specified priority. * * Create a request for the method "networkFirewallPolicies.getRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to which the queried rule belongs. * @since 1.13 */ protected GetRule(java.lang.String project, java.lang.String firewallPolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FirewallPolicyRule.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetRule set$Xgafv(java.lang.String $Xgafv) { return (GetRule) super.set$Xgafv($Xgafv); } @Override public GetRule setAccessToken(java.lang.String accessToken) { return (GetRule) super.setAccessToken(accessToken); } @Override public GetRule setAlt(java.lang.String alt) { return (GetRule) super.setAlt(alt); } @Override public GetRule setCallback(java.lang.String callback) { return (GetRule) super.setCallback(callback); } @Override public GetRule setFields(java.lang.String fields) { return (GetRule) super.setFields(fields); } @Override public GetRule setKey(java.lang.String key) { return (GetRule) super.setKey(key); } @Override public GetRule setOauthToken(java.lang.String oauthToken) { return (GetRule) super.setOauthToken(oauthToken); } @Override public GetRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetRule) super.setPrettyPrint(prettyPrint); } @Override public GetRule setQuotaUser(java.lang.String quotaUser) { return (GetRule) super.setQuotaUser(quotaUser); } @Override public GetRule setUploadType(java.lang.String uploadType) { return (GetRule) super.setUploadType(uploadType); } @Override public GetRule setUploadProtocol(java.lang.String uploadProtocol) { return (GetRule) super.setUploadProtocol(uploadProtocol); } @Override public GetRule setUserIp(java.lang.String userIp) { return (GetRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the firewall policy to which the queried rule belongs. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to which the queried rule belongs. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to which the queried rule belongs. */ public GetRule setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** The priority of the rule to get from the firewall policy. */ @com.google.api.client.util.Key private java.lang.Integer priority; /** The priority of the rule to get from the firewall policy. */ public java.lang.Integer getPriority() { return priority; } /** The priority of the rule to get from the firewall policy. */ public GetRule setPriority(java.lang.Integer priority) { this.priority = priority; return this; } @Override public GetRule set(String parameterName, Object value) { return (GetRule) super.set(parameterName, value); } } /** * Creates a new policy in the specified project using the data included in the request. * * Create a request for the method "networkFirewallPolicies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.FirewallPolicy} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.FirewallPolicy content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a new policy in the specified project using the data included in the request. * * Create a request for the method "networkFirewallPolicies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.FirewallPolicy} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.FirewallPolicy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists all the policies that have been configured for the specified project. * * Create a request for the method "networkFirewallPolicies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists all the policies that have been configured for the specified project. * * Create a request for the method "networkFirewallPolicies.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FirewallPolicyList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified policy with the data included in the request. * * Create a request for the method "networkFirewallPolicies.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicy} * @return the request */ public Patch patch(java.lang.String project, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicy content) throws java.io.IOException { Patch result = new Patch(project, firewallPolicy, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies/{firewallPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified policy with the data included in the request. * * Create a request for the method "networkFirewallPolicies.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicy} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicy content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public Patch setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Patches a rule of the specified priority. * * Create a request for the method "networkFirewallPolicies.patchRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link PatchRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyRule} * @return the request */ public PatchRule patchRule(java.lang.String project, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyRule content) throws java.io.IOException { PatchRule result = new PatchRule(project, firewallPolicy, content); initialize(result); return result; } public class PatchRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches a rule of the specified priority. * * Create a request for the method "networkFirewallPolicies.patchRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link PatchRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyRule} * @since 1.13 */ protected PatchRule(java.lang.String project, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyRule content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public PatchRule set$Xgafv(java.lang.String $Xgafv) { return (PatchRule) super.set$Xgafv($Xgafv); } @Override public PatchRule setAccessToken(java.lang.String accessToken) { return (PatchRule) super.setAccessToken(accessToken); } @Override public PatchRule setAlt(java.lang.String alt) { return (PatchRule) super.setAlt(alt); } @Override public PatchRule setCallback(java.lang.String callback) { return (PatchRule) super.setCallback(callback); } @Override public PatchRule setFields(java.lang.String fields) { return (PatchRule) super.setFields(fields); } @Override public PatchRule setKey(java.lang.String key) { return (PatchRule) super.setKey(key); } @Override public PatchRule setOauthToken(java.lang.String oauthToken) { return (PatchRule) super.setOauthToken(oauthToken); } @Override public PatchRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (PatchRule) super.setPrettyPrint(prettyPrint); } @Override public PatchRule setQuotaUser(java.lang.String quotaUser) { return (PatchRule) super.setQuotaUser(quotaUser); } @Override public PatchRule setUploadType(java.lang.String uploadType) { return (PatchRule) super.setUploadType(uploadType); } @Override public PatchRule setUploadProtocol(java.lang.String uploadProtocol) { return (PatchRule) super.setUploadProtocol(uploadProtocol); } @Override public PatchRule setUserIp(java.lang.String userIp) { return (PatchRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public PatchRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public PatchRule setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** The priority of the rule to patch. */ @com.google.api.client.util.Key private java.lang.Integer priority; /** The priority of the rule to patch. */ public java.lang.Integer getPriority() { return priority; } /** The priority of the rule to patch. */ public PatchRule setPriority(java.lang.Integer priority) { this.priority = priority; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public PatchRule setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public PatchRule set(String parameterName, Object value) { return (PatchRule) super.set(parameterName, value); } } /** * Removes an association for the specified firewall policy. * * Create a request for the method "networkFirewallPolicies.removeAssociation". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RemoveAssociation#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to update. * @return the request */ public RemoveAssociation removeAssociation(java.lang.String project, java.lang.String firewallPolicy) throws java.io.IOException { RemoveAssociation result = new RemoveAssociation(project, firewallPolicy); initialize(result); return result; } public class RemoveAssociation extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeAssociation"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Removes an association for the specified firewall policy. * * Create a request for the method "networkFirewallPolicies.removeAssociation". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RemoveAssociation#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to update. * @since 1.13 */ protected RemoveAssociation(java.lang.String project, java.lang.String firewallPolicy) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public RemoveAssociation set$Xgafv(java.lang.String $Xgafv) { return (RemoveAssociation) super.set$Xgafv($Xgafv); } @Override public RemoveAssociation setAccessToken(java.lang.String accessToken) { return (RemoveAssociation) super.setAccessToken(accessToken); } @Override public RemoveAssociation setAlt(java.lang.String alt) { return (RemoveAssociation) super.setAlt(alt); } @Override public RemoveAssociation setCallback(java.lang.String callback) { return (RemoveAssociation) super.setCallback(callback); } @Override public RemoveAssociation setFields(java.lang.String fields) { return (RemoveAssociation) super.setFields(fields); } @Override public RemoveAssociation setKey(java.lang.String key) { return (RemoveAssociation) super.setKey(key); } @Override public RemoveAssociation setOauthToken(java.lang.String oauthToken) { return (RemoveAssociation) super.setOauthToken(oauthToken); } @Override public RemoveAssociation setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveAssociation) super.setPrettyPrint(prettyPrint); } @Override public RemoveAssociation setQuotaUser(java.lang.String quotaUser) { return (RemoveAssociation) super.setQuotaUser(quotaUser); } @Override public RemoveAssociation setUploadType(java.lang.String uploadType) { return (RemoveAssociation) super.setUploadType(uploadType); } @Override public RemoveAssociation setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveAssociation) super.setUploadProtocol(uploadProtocol); } @Override public RemoveAssociation setUserIp(java.lang.String userIp) { return (RemoveAssociation) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public RemoveAssociation setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public RemoveAssociation setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** Name for the attachment that will be removed. */ @com.google.api.client.util.Key private java.lang.String name; /** Name for the attachment that will be removed. */ public java.lang.String getName() { return name; } /** Name for the attachment that will be removed. */ public RemoveAssociation setName(java.lang.String name) { this.name = name; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public RemoveAssociation setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public RemoveAssociation set(String parameterName, Object value) { return (RemoveAssociation) super.set(parameterName, value); } } /** * Deletes a rule of the specified priority. * * Create a request for the method "networkFirewallPolicies.removeRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RemoveRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to update. * @return the request */ public RemoveRule removeRule(java.lang.String project, java.lang.String firewallPolicy) throws java.io.IOException { RemoveRule result = new RemoveRule(project, firewallPolicy); initialize(result); return result; } public class RemoveRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes a rule of the specified priority. * * Create a request for the method "networkFirewallPolicies.removeRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RemoveRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param firewallPolicy Name of the firewall policy to update. * @since 1.13 */ protected RemoveRule(java.lang.String project, java.lang.String firewallPolicy) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public RemoveRule set$Xgafv(java.lang.String $Xgafv) { return (RemoveRule) super.set$Xgafv($Xgafv); } @Override public RemoveRule setAccessToken(java.lang.String accessToken) { return (RemoveRule) super.setAccessToken(accessToken); } @Override public RemoveRule setAlt(java.lang.String alt) { return (RemoveRule) super.setAlt(alt); } @Override public RemoveRule setCallback(java.lang.String callback) { return (RemoveRule) super.setCallback(callback); } @Override public RemoveRule setFields(java.lang.String fields) { return (RemoveRule) super.setFields(fields); } @Override public RemoveRule setKey(java.lang.String key) { return (RemoveRule) super.setKey(key); } @Override public RemoveRule setOauthToken(java.lang.String oauthToken) { return (RemoveRule) super.setOauthToken(oauthToken); } @Override public RemoveRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveRule) super.setPrettyPrint(prettyPrint); } @Override public RemoveRule setQuotaUser(java.lang.String quotaUser) { return (RemoveRule) super.setQuotaUser(quotaUser); } @Override public RemoveRule setUploadType(java.lang.String uploadType) { return (RemoveRule) super.setUploadType(uploadType); } @Override public RemoveRule setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveRule) super.setUploadProtocol(uploadProtocol); } @Override public RemoveRule setUserIp(java.lang.String userIp) { return (RemoveRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public RemoveRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public RemoveRule setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** The priority of the rule to remove from the firewall policy. */ @com.google.api.client.util.Key private java.lang.Integer priority; /** The priority of the rule to remove from the firewall policy. */ public java.lang.Integer getPriority() { return priority; } /** The priority of the rule to remove from the firewall policy. */ public RemoveRule setPriority(java.lang.Integer priority) { this.priority = priority; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public RemoveRule setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public RemoveRule set(String parameterName, Object value) { return (RemoveRule) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "networkFirewallPolicies.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "networkFirewallPolicies.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "networkFirewallPolicies.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/firewallPolicies/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "networkFirewallPolicies.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Networks collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Networks.List request = compute.networks().list(parameters ...)}
   * 
* * @return the resource collection */ public Networks networks() { return new Networks(); } /** * The "networks" collection of methods. */ public class Networks { /** * Adds a peering to the specified network. * * Create a request for the method "networks.addPeering". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddPeering#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param network Name of the network resource to add peering to. * @param content the {@link com.google.api.services.compute.model.NetworksAddPeeringRequest} * @return the request */ public AddPeering addPeering(java.lang.String project, java.lang.String network, com.google.api.services.compute.model.NetworksAddPeeringRequest content) throws java.io.IOException { AddPeering result = new AddPeering(project, network, content); initialize(result); return result; } public class AddPeering extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networks/{network}/addPeering"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern NETWORK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Adds a peering to the specified network. * * Create a request for the method "networks.addPeering". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddPeering#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param network Name of the network resource to add peering to. * @param content the {@link com.google.api.services.compute.model.NetworksAddPeeringRequest} * @since 1.13 */ protected AddPeering(java.lang.String project, java.lang.String network, com.google.api.services.compute.model.NetworksAddPeeringRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.network = com.google.api.client.util.Preconditions.checkNotNull(network, "Required parameter network must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public AddPeering set$Xgafv(java.lang.String $Xgafv) { return (AddPeering) super.set$Xgafv($Xgafv); } @Override public AddPeering setAccessToken(java.lang.String accessToken) { return (AddPeering) super.setAccessToken(accessToken); } @Override public AddPeering setAlt(java.lang.String alt) { return (AddPeering) super.setAlt(alt); } @Override public AddPeering setCallback(java.lang.String callback) { return (AddPeering) super.setCallback(callback); } @Override public AddPeering setFields(java.lang.String fields) { return (AddPeering) super.setFields(fields); } @Override public AddPeering setKey(java.lang.String key) { return (AddPeering) super.setKey(key); } @Override public AddPeering setOauthToken(java.lang.String oauthToken) { return (AddPeering) super.setOauthToken(oauthToken); } @Override public AddPeering setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddPeering) super.setPrettyPrint(prettyPrint); } @Override public AddPeering setQuotaUser(java.lang.String quotaUser) { return (AddPeering) super.setQuotaUser(quotaUser); } @Override public AddPeering setUploadType(java.lang.String uploadType) { return (AddPeering) super.setUploadType(uploadType); } @Override public AddPeering setUploadProtocol(java.lang.String uploadProtocol) { return (AddPeering) super.setUploadProtocol(uploadProtocol); } @Override public AddPeering setUserIp(java.lang.String userIp) { return (AddPeering) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddPeering setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the network resource to add peering to. */ @com.google.api.client.util.Key private java.lang.String network; /** Name of the network resource to add peering to. */ public java.lang.String getNetwork() { return network; } /** Name of the network resource to add peering to. */ public AddPeering setNetwork(java.lang.String network) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.network = network; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddPeering setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddPeering set(String parameterName, Object value) { return (AddPeering) super.set(parameterName, value); } } /** * Deletes the specified network. * * Create a request for the method "networks.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param network Name of the network to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String network) throws java.io.IOException { Delete result = new Delete(project, network); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networks/{network}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern NETWORK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified network. * * Create a request for the method "networks.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param network Name of the network to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String network) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.network = com.google.api.client.util.Preconditions.checkNotNull(network, "Required parameter network must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the network to delete. */ @com.google.api.client.util.Key private java.lang.String network; /** Name of the network to delete. */ public java.lang.String getNetwork() { return network; } /** Name of the network to delete. */ public Delete setNetwork(java.lang.String network) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.network = network; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified network. * * Create a request for the method "networks.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param network Name of the network to return. * @return the request */ public Get get(java.lang.String project, java.lang.String network) throws java.io.IOException { Get result = new Get(project, network); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networks/{network}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern NETWORK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified network. * * Create a request for the method "networks.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param network Name of the network to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String network) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Network.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.network = com.google.api.client.util.Preconditions.checkNotNull(network, "Required parameter network must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the network to return. */ @com.google.api.client.util.Key private java.lang.String network; /** Name of the network to return. */ public java.lang.String getNetwork() { return network; } /** Name of the network to return. */ public Get setNetwork(java.lang.String network) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.network = network; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Returns the effective firewalls on a given network. * * Create a request for the method "networks.getEffectiveFirewalls". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetEffectiveFirewalls#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param network Name of the network for this request. * @return the request */ public GetEffectiveFirewalls getEffectiveFirewalls(java.lang.String project, java.lang.String network) throws java.io.IOException { GetEffectiveFirewalls result = new GetEffectiveFirewalls(project, network); initialize(result); return result; } public class GetEffectiveFirewalls extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networks/{network}/getEffectiveFirewalls"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern NETWORK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Returns the effective firewalls on a given network. * * Create a request for the method "networks.getEffectiveFirewalls". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetEffectiveFirewalls#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param network Name of the network for this request. * @since 1.13 */ protected GetEffectiveFirewalls(java.lang.String project, java.lang.String network) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NetworksGetEffectiveFirewallsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.network = com.google.api.client.util.Preconditions.checkNotNull(network, "Required parameter network must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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 GetEffectiveFirewalls set$Xgafv(java.lang.String $Xgafv) { return (GetEffectiveFirewalls) super.set$Xgafv($Xgafv); } @Override public GetEffectiveFirewalls setAccessToken(java.lang.String accessToken) { return (GetEffectiveFirewalls) super.setAccessToken(accessToken); } @Override public GetEffectiveFirewalls setAlt(java.lang.String alt) { return (GetEffectiveFirewalls) super.setAlt(alt); } @Override public GetEffectiveFirewalls setCallback(java.lang.String callback) { return (GetEffectiveFirewalls) super.setCallback(callback); } @Override public GetEffectiveFirewalls setFields(java.lang.String fields) { return (GetEffectiveFirewalls) super.setFields(fields); } @Override public GetEffectiveFirewalls setKey(java.lang.String key) { return (GetEffectiveFirewalls) super.setKey(key); } @Override public GetEffectiveFirewalls setOauthToken(java.lang.String oauthToken) { return (GetEffectiveFirewalls) super.setOauthToken(oauthToken); } @Override public GetEffectiveFirewalls setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetEffectiveFirewalls) super.setPrettyPrint(prettyPrint); } @Override public GetEffectiveFirewalls setQuotaUser(java.lang.String quotaUser) { return (GetEffectiveFirewalls) super.setQuotaUser(quotaUser); } @Override public GetEffectiveFirewalls setUploadType(java.lang.String uploadType) { return (GetEffectiveFirewalls) super.setUploadType(uploadType); } @Override public GetEffectiveFirewalls setUploadProtocol(java.lang.String uploadProtocol) { return (GetEffectiveFirewalls) super.setUploadProtocol(uploadProtocol); } @Override public GetEffectiveFirewalls setUserIp(java.lang.String userIp) { return (GetEffectiveFirewalls) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetEffectiveFirewalls setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the network for this request. */ @com.google.api.client.util.Key private java.lang.String network; /** Name of the network for this request. */ public java.lang.String getNetwork() { return network; } /** Name of the network for this request. */ public GetEffectiveFirewalls setNetwork(java.lang.String network) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.network = network; return this; } @Override public GetEffectiveFirewalls set(String parameterName, Object value) { return (GetEffectiveFirewalls) super.set(parameterName, value); } } /** * Creates a network in the specified project using the data included in the request. * * Create a request for the method "networks.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Network} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.Network content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a network in the specified project using the data included in the request. * * Create a request for the method "networks.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Network} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.Network content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of networks available to the specified project. * * Create a request for the method "networks.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of networks available to the specified project. * * Create a request for the method "networks.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NetworkList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Lists the peering routes exchanged over peering connection. * * Create a request for the method "networks.listPeeringRoutes". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListPeeringRoutes#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param network Name of the network for this request. * @return the request */ public ListPeeringRoutes listPeeringRoutes(java.lang.String project, java.lang.String network) throws java.io.IOException { ListPeeringRoutes result = new ListPeeringRoutes(project, network); initialize(result); return result; } public class ListPeeringRoutes extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networks/{network}/listPeeringRoutes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern NETWORK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Lists the peering routes exchanged over peering connection. * * Create a request for the method "networks.listPeeringRoutes". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListPeeringRoutes#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param network Name of the network for this request. * @since 1.13 */ protected ListPeeringRoutes(java.lang.String project, java.lang.String network) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ExchangedPeeringRoutesList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.network = com.google.api.client.util.Preconditions.checkNotNull(network, "Required parameter network must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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 ListPeeringRoutes set$Xgafv(java.lang.String $Xgafv) { return (ListPeeringRoutes) super.set$Xgafv($Xgafv); } @Override public ListPeeringRoutes setAccessToken(java.lang.String accessToken) { return (ListPeeringRoutes) super.setAccessToken(accessToken); } @Override public ListPeeringRoutes setAlt(java.lang.String alt) { return (ListPeeringRoutes) super.setAlt(alt); } @Override public ListPeeringRoutes setCallback(java.lang.String callback) { return (ListPeeringRoutes) super.setCallback(callback); } @Override public ListPeeringRoutes setFields(java.lang.String fields) { return (ListPeeringRoutes) super.setFields(fields); } @Override public ListPeeringRoutes setKey(java.lang.String key) { return (ListPeeringRoutes) super.setKey(key); } @Override public ListPeeringRoutes setOauthToken(java.lang.String oauthToken) { return (ListPeeringRoutes) super.setOauthToken(oauthToken); } @Override public ListPeeringRoutes setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListPeeringRoutes) super.setPrettyPrint(prettyPrint); } @Override public ListPeeringRoutes setQuotaUser(java.lang.String quotaUser) { return (ListPeeringRoutes) super.setQuotaUser(quotaUser); } @Override public ListPeeringRoutes setUploadType(java.lang.String uploadType) { return (ListPeeringRoutes) super.setUploadType(uploadType); } @Override public ListPeeringRoutes setUploadProtocol(java.lang.String uploadProtocol) { return (ListPeeringRoutes) super.setUploadProtocol(uploadProtocol); } @Override public ListPeeringRoutes setUserIp(java.lang.String userIp) { return (ListPeeringRoutes) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListPeeringRoutes setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the network for this request. */ @com.google.api.client.util.Key private java.lang.String network; /** Name of the network for this request. */ public java.lang.String getNetwork() { return network; } /** Name of the network for this request. */ public ListPeeringRoutes setNetwork(java.lang.String network) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.network = network; return this; } /** The direction of the exchanged routes. */ @com.google.api.client.util.Key private java.lang.String direction; /** The direction of the exchanged routes. */ public java.lang.String getDirection() { return direction; } /** The direction of the exchanged routes. */ public ListPeeringRoutes setDirection(java.lang.String direction) { this.direction = direction; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListPeeringRoutes setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListPeeringRoutes setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListPeeringRoutes setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListPeeringRoutes setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** The response will show routes exchanged over the given peering connection. */ @com.google.api.client.util.Key private java.lang.String peeringName; /** The response will show routes exchanged over the given peering connection. */ public java.lang.String getPeeringName() { return peeringName; } /** The response will show routes exchanged over the given peering connection. */ public ListPeeringRoutes setPeeringName(java.lang.String peeringName) { this.peeringName = peeringName; return this; } /** * The region of the request. The response will include all subnet routes, static routes and * dynamic routes in the region. */ @com.google.api.client.util.Key private java.lang.String region; /** The region of the request. The response will include all subnet routes, static routes and dynamic routes in the region. */ public java.lang.String getRegion() { return region; } /** * The region of the request. The response will include all subnet routes, static routes and * dynamic routes in the region. */ public ListPeeringRoutes setRegion(java.lang.String region) { this.region = region; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListPeeringRoutes setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListPeeringRoutes set(String parameterName, Object value) { return (ListPeeringRoutes) super.set(parameterName, value); } } /** * Patches the specified network with the data included in the request. Only routingConfig can be * modified. * * Create a request for the method "networks.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param network Name of the network to update. * @param content the {@link com.google.api.services.compute.model.Network} * @return the request */ public Patch patch(java.lang.String project, java.lang.String network, com.google.api.services.compute.model.Network content) throws java.io.IOException { Patch result = new Patch(project, network, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networks/{network}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern NETWORK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified network with the data included in the request. Only routingConfig can be * modified. * * Create a request for the method "networks.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param network Name of the network to update. * @param content the {@link com.google.api.services.compute.model.Network} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String network, com.google.api.services.compute.model.Network content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.network = com.google.api.client.util.Preconditions.checkNotNull(network, "Required parameter network must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the network to update. */ @com.google.api.client.util.Key private java.lang.String network; /** Name of the network to update. */ public java.lang.String getNetwork() { return network; } /** Name of the network to update. */ public Patch setNetwork(java.lang.String network) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.network = network; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Removes a peering from the specified network. * * Create a request for the method "networks.removePeering". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RemovePeering#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param network Name of the network resource to remove peering from. * @param content the {@link com.google.api.services.compute.model.NetworksRemovePeeringRequest} * @return the request */ public RemovePeering removePeering(java.lang.String project, java.lang.String network, com.google.api.services.compute.model.NetworksRemovePeeringRequest content) throws java.io.IOException { RemovePeering result = new RemovePeering(project, network, content); initialize(result); return result; } public class RemovePeering extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networks/{network}/removePeering"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern NETWORK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Removes a peering from the specified network. * * Create a request for the method "networks.removePeering". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RemovePeering#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param network Name of the network resource to remove peering from. * @param content the {@link com.google.api.services.compute.model.NetworksRemovePeeringRequest} * @since 1.13 */ protected RemovePeering(java.lang.String project, java.lang.String network, com.google.api.services.compute.model.NetworksRemovePeeringRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.network = com.google.api.client.util.Preconditions.checkNotNull(network, "Required parameter network must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public RemovePeering set$Xgafv(java.lang.String $Xgafv) { return (RemovePeering) super.set$Xgafv($Xgafv); } @Override public RemovePeering setAccessToken(java.lang.String accessToken) { return (RemovePeering) super.setAccessToken(accessToken); } @Override public RemovePeering setAlt(java.lang.String alt) { return (RemovePeering) super.setAlt(alt); } @Override public RemovePeering setCallback(java.lang.String callback) { return (RemovePeering) super.setCallback(callback); } @Override public RemovePeering setFields(java.lang.String fields) { return (RemovePeering) super.setFields(fields); } @Override public RemovePeering setKey(java.lang.String key) { return (RemovePeering) super.setKey(key); } @Override public RemovePeering setOauthToken(java.lang.String oauthToken) { return (RemovePeering) super.setOauthToken(oauthToken); } @Override public RemovePeering setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemovePeering) super.setPrettyPrint(prettyPrint); } @Override public RemovePeering setQuotaUser(java.lang.String quotaUser) { return (RemovePeering) super.setQuotaUser(quotaUser); } @Override public RemovePeering setUploadType(java.lang.String uploadType) { return (RemovePeering) super.setUploadType(uploadType); } @Override public RemovePeering setUploadProtocol(java.lang.String uploadProtocol) { return (RemovePeering) super.setUploadProtocol(uploadProtocol); } @Override public RemovePeering setUserIp(java.lang.String userIp) { return (RemovePeering) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public RemovePeering setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the network resource to remove peering from. */ @com.google.api.client.util.Key private java.lang.String network; /** Name of the network resource to remove peering from. */ public java.lang.String getNetwork() { return network; } /** Name of the network resource to remove peering from. */ public RemovePeering setNetwork(java.lang.String network) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.network = network; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public RemovePeering setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public RemovePeering set(String parameterName, Object value) { return (RemovePeering) super.set(parameterName, value); } } /** * Switches the network mode from auto subnet mode to custom subnet mode. * * Create a request for the method "networks.switchToCustomMode". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SwitchToCustomMode#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param network Name of the network to be updated. * @return the request */ public SwitchToCustomMode switchToCustomMode(java.lang.String project, java.lang.String network) throws java.io.IOException { SwitchToCustomMode result = new SwitchToCustomMode(project, network); initialize(result); return result; } public class SwitchToCustomMode extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networks/{network}/switchToCustomMode"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern NETWORK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Switches the network mode from auto subnet mode to custom subnet mode. * * Create a request for the method "networks.switchToCustomMode". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SwitchToCustomMode#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param network Name of the network to be updated. * @since 1.13 */ protected SwitchToCustomMode(java.lang.String project, java.lang.String network) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.network = com.google.api.client.util.Preconditions.checkNotNull(network, "Required parameter network must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SwitchToCustomMode set$Xgafv(java.lang.String $Xgafv) { return (SwitchToCustomMode) super.set$Xgafv($Xgafv); } @Override public SwitchToCustomMode setAccessToken(java.lang.String accessToken) { return (SwitchToCustomMode) super.setAccessToken(accessToken); } @Override public SwitchToCustomMode setAlt(java.lang.String alt) { return (SwitchToCustomMode) super.setAlt(alt); } @Override public SwitchToCustomMode setCallback(java.lang.String callback) { return (SwitchToCustomMode) super.setCallback(callback); } @Override public SwitchToCustomMode setFields(java.lang.String fields) { return (SwitchToCustomMode) super.setFields(fields); } @Override public SwitchToCustomMode setKey(java.lang.String key) { return (SwitchToCustomMode) super.setKey(key); } @Override public SwitchToCustomMode setOauthToken(java.lang.String oauthToken) { return (SwitchToCustomMode) super.setOauthToken(oauthToken); } @Override public SwitchToCustomMode setPrettyPrint(java.lang.Boolean prettyPrint) { return (SwitchToCustomMode) super.setPrettyPrint(prettyPrint); } @Override public SwitchToCustomMode setQuotaUser(java.lang.String quotaUser) { return (SwitchToCustomMode) super.setQuotaUser(quotaUser); } @Override public SwitchToCustomMode setUploadType(java.lang.String uploadType) { return (SwitchToCustomMode) super.setUploadType(uploadType); } @Override public SwitchToCustomMode setUploadProtocol(java.lang.String uploadProtocol) { return (SwitchToCustomMode) super.setUploadProtocol(uploadProtocol); } @Override public SwitchToCustomMode setUserIp(java.lang.String userIp) { return (SwitchToCustomMode) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SwitchToCustomMode setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the network to be updated. */ @com.google.api.client.util.Key private java.lang.String network; /** Name of the network to be updated. */ public java.lang.String getNetwork() { return network; } /** Name of the network to be updated. */ public SwitchToCustomMode setNetwork(java.lang.String network) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.network = network; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SwitchToCustomMode setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SwitchToCustomMode set(String parameterName, Object value) { return (SwitchToCustomMode) super.set(parameterName, value); } } /** * Updates the specified network peering with the data included in the request. You can only modify * the NetworkPeering.export_custom_routes field and the NetworkPeering.import_custom_routes field. * * Create a request for the method "networks.updatePeering". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link UpdatePeering#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param network Name of the network resource which the updated peering is belonging to. * @param content the {@link com.google.api.services.compute.model.NetworksUpdatePeeringRequest} * @return the request */ public UpdatePeering updatePeering(java.lang.String project, java.lang.String network, com.google.api.services.compute.model.NetworksUpdatePeeringRequest content) throws java.io.IOException { UpdatePeering result = new UpdatePeering(project, network, content); initialize(result); return result; } public class UpdatePeering extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/networks/{network}/updatePeering"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern NETWORK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified network peering with the data included in the request. You can only * modify the NetworkPeering.export_custom_routes field and the * NetworkPeering.import_custom_routes field. * * Create a request for the method "networks.updatePeering". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link UpdatePeering#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param network Name of the network resource which the updated peering is belonging to. * @param content the {@link com.google.api.services.compute.model.NetworksUpdatePeeringRequest} * @since 1.13 */ protected UpdatePeering(java.lang.String project, java.lang.String network, com.google.api.services.compute.model.NetworksUpdatePeeringRequest content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.network = com.google.api.client.util.Preconditions.checkNotNull(network, "Required parameter network must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public UpdatePeering set$Xgafv(java.lang.String $Xgafv) { return (UpdatePeering) super.set$Xgafv($Xgafv); } @Override public UpdatePeering setAccessToken(java.lang.String accessToken) { return (UpdatePeering) super.setAccessToken(accessToken); } @Override public UpdatePeering setAlt(java.lang.String alt) { return (UpdatePeering) super.setAlt(alt); } @Override public UpdatePeering setCallback(java.lang.String callback) { return (UpdatePeering) super.setCallback(callback); } @Override public UpdatePeering setFields(java.lang.String fields) { return (UpdatePeering) super.setFields(fields); } @Override public UpdatePeering setKey(java.lang.String key) { return (UpdatePeering) super.setKey(key); } @Override public UpdatePeering setOauthToken(java.lang.String oauthToken) { return (UpdatePeering) super.setOauthToken(oauthToken); } @Override public UpdatePeering setPrettyPrint(java.lang.Boolean prettyPrint) { return (UpdatePeering) super.setPrettyPrint(prettyPrint); } @Override public UpdatePeering setQuotaUser(java.lang.String quotaUser) { return (UpdatePeering) super.setQuotaUser(quotaUser); } @Override public UpdatePeering setUploadType(java.lang.String uploadType) { return (UpdatePeering) super.setUploadType(uploadType); } @Override public UpdatePeering setUploadProtocol(java.lang.String uploadProtocol) { return (UpdatePeering) super.setUploadProtocol(uploadProtocol); } @Override public UpdatePeering setUserIp(java.lang.String userIp) { return (UpdatePeering) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public UpdatePeering setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the network resource which the updated peering is belonging to. */ @com.google.api.client.util.Key private java.lang.String network; /** Name of the network resource which the updated peering is belonging to. */ public java.lang.String getNetwork() { return network; } /** Name of the network resource which the updated peering is belonging to. */ public UpdatePeering setNetwork(java.lang.String network) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NETWORK_PATTERN.matcher(network).matches(), "Parameter network must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.network = network; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public UpdatePeering setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public UpdatePeering set(String parameterName, Object value) { return (UpdatePeering) super.set(parameterName, value); } } } /** * An accessor for creating requests from the NodeGroups collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.NodeGroups.List request = compute.nodeGroups().list(parameters ...)}
   * 
* * @return the resource collection */ public NodeGroups nodeGroups() { return new NodeGroups(); } /** * The "nodeGroups" collection of methods. */ public class NodeGroups { /** * Adds specified number of nodes to the node group. * * Create a request for the method "nodeGroups.addNodes". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddNodes#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the NodeGroup resource. * @param content the {@link com.google.api.services.compute.model.NodeGroupsAddNodesRequest} * @return the request */ public AddNodes addNodes(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup, com.google.api.services.compute.model.NodeGroupsAddNodesRequest content) throws java.io.IOException { AddNodes result = new AddNodes(project, zone, nodeGroup, content); initialize(result); return result; } public class AddNodes extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/addNodes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NODE_GROUP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Adds specified number of nodes to the node group. * * Create a request for the method "nodeGroups.addNodes". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddNodes#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the NodeGroup resource. * @param content the {@link com.google.api.services.compute.model.NodeGroupsAddNodesRequest} * @since 1.13 */ protected AddNodes(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup, com.google.api.services.compute.model.NodeGroupsAddNodesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.nodeGroup = com.google.api.client.util.Preconditions.checkNotNull(nodeGroup, "Required parameter nodeGroup must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public AddNodes set$Xgafv(java.lang.String $Xgafv) { return (AddNodes) super.set$Xgafv($Xgafv); } @Override public AddNodes setAccessToken(java.lang.String accessToken) { return (AddNodes) super.setAccessToken(accessToken); } @Override public AddNodes setAlt(java.lang.String alt) { return (AddNodes) super.setAlt(alt); } @Override public AddNodes setCallback(java.lang.String callback) { return (AddNodes) super.setCallback(callback); } @Override public AddNodes setFields(java.lang.String fields) { return (AddNodes) super.setFields(fields); } @Override public AddNodes setKey(java.lang.String key) { return (AddNodes) super.setKey(key); } @Override public AddNodes setOauthToken(java.lang.String oauthToken) { return (AddNodes) super.setOauthToken(oauthToken); } @Override public AddNodes setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddNodes) super.setPrettyPrint(prettyPrint); } @Override public AddNodes setQuotaUser(java.lang.String quotaUser) { return (AddNodes) super.setQuotaUser(quotaUser); } @Override public AddNodes setUploadType(java.lang.String uploadType) { return (AddNodes) super.setUploadType(uploadType); } @Override public AddNodes setUploadProtocol(java.lang.String uploadProtocol) { return (AddNodes) super.setUploadProtocol(uploadProtocol); } @Override public AddNodes setUserIp(java.lang.String userIp) { return (AddNodes) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddNodes setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public AddNodes setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the NodeGroup resource. */ @com.google.api.client.util.Key private java.lang.String nodeGroup; /** Name of the NodeGroup resource. */ public java.lang.String getNodeGroup() { return nodeGroup; } /** Name of the NodeGroup resource. */ public AddNodes setNodeGroup(java.lang.String nodeGroup) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.nodeGroup = nodeGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddNodes setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddNodes set(String parameterName, Object value) { return (AddNodes) super.set(parameterName, value); } } /** * Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details * about each group. To prevent failure, Google recommends that you set the `returnPartialSuccess` * parameter to `true`. * * Create a request for the method "nodeGroups.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/nodeGroups"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details * about each group. To prevent failure, Google recommends that you set the `returnPartialSuccess` * parameter to `true`. * * Create a request for the method "nodeGroups.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NodeGroupAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified NodeGroup resource. * * Create a request for the method "nodeGroups.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the NodeGroup resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup) throws java.io.IOException { Delete result = new Delete(project, zone, nodeGroup); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NODE_GROUP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified NodeGroup resource. * * Create a request for the method "nodeGroups.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the NodeGroup resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.nodeGroup = com.google.api.client.util.Preconditions.checkNotNull(nodeGroup, "Required parameter nodeGroup must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Delete setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the NodeGroup resource to delete. */ @com.google.api.client.util.Key private java.lang.String nodeGroup; /** Name of the NodeGroup resource to delete. */ public java.lang.String getNodeGroup() { return nodeGroup; } /** Name of the NodeGroup resource to delete. */ public Delete setNodeGroup(java.lang.String nodeGroup) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.nodeGroup = nodeGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Deletes specified nodes from the node group. * * Create a request for the method "nodeGroups.deleteNodes". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link DeleteNodes#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the NodeGroup resource whose nodes will be deleted. * @param content the {@link com.google.api.services.compute.model.NodeGroupsDeleteNodesRequest} * @return the request */ public DeleteNodes deleteNodes(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup, com.google.api.services.compute.model.NodeGroupsDeleteNodesRequest content) throws java.io.IOException { DeleteNodes result = new DeleteNodes(project, zone, nodeGroup, content); initialize(result); return result; } public class DeleteNodes extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/deleteNodes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NODE_GROUP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes specified nodes from the node group. * * Create a request for the method "nodeGroups.deleteNodes". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link DeleteNodes#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the NodeGroup resource whose nodes will be deleted. * @param content the {@link com.google.api.services.compute.model.NodeGroupsDeleteNodesRequest} * @since 1.13 */ protected DeleteNodes(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup, com.google.api.services.compute.model.NodeGroupsDeleteNodesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.nodeGroup = com.google.api.client.util.Preconditions.checkNotNull(nodeGroup, "Required parameter nodeGroup must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public DeleteNodes set$Xgafv(java.lang.String $Xgafv) { return (DeleteNodes) super.set$Xgafv($Xgafv); } @Override public DeleteNodes setAccessToken(java.lang.String accessToken) { return (DeleteNodes) super.setAccessToken(accessToken); } @Override public DeleteNodes setAlt(java.lang.String alt) { return (DeleteNodes) super.setAlt(alt); } @Override public DeleteNodes setCallback(java.lang.String callback) { return (DeleteNodes) super.setCallback(callback); } @Override public DeleteNodes setFields(java.lang.String fields) { return (DeleteNodes) super.setFields(fields); } @Override public DeleteNodes setKey(java.lang.String key) { return (DeleteNodes) super.setKey(key); } @Override public DeleteNodes setOauthToken(java.lang.String oauthToken) { return (DeleteNodes) super.setOauthToken(oauthToken); } @Override public DeleteNodes setPrettyPrint(java.lang.Boolean prettyPrint) { return (DeleteNodes) super.setPrettyPrint(prettyPrint); } @Override public DeleteNodes setQuotaUser(java.lang.String quotaUser) { return (DeleteNodes) super.setQuotaUser(quotaUser); } @Override public DeleteNodes setUploadType(java.lang.String uploadType) { return (DeleteNodes) super.setUploadType(uploadType); } @Override public DeleteNodes setUploadProtocol(java.lang.String uploadProtocol) { return (DeleteNodes) super.setUploadProtocol(uploadProtocol); } @Override public DeleteNodes setUserIp(java.lang.String userIp) { return (DeleteNodes) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public DeleteNodes setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public DeleteNodes setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the NodeGroup resource whose nodes will be deleted. */ @com.google.api.client.util.Key private java.lang.String nodeGroup; /** Name of the NodeGroup resource whose nodes will be deleted. */ public java.lang.String getNodeGroup() { return nodeGroup; } /** Name of the NodeGroup resource whose nodes will be deleted. */ public DeleteNodes setNodeGroup(java.lang.String nodeGroup) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.nodeGroup = nodeGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public DeleteNodes setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public DeleteNodes set(String parameterName, Object value) { return (DeleteNodes) super.set(parameterName, value); } } /** * Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. * Note: the "nodes" field should not be used. Use nodeGroups.listNodes instead. * * Create a request for the method "nodeGroups.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the node group to return. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup) throws java.io.IOException { Get result = new Get(project, zone, nodeGroup); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NODE_GROUP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. * Note: the "nodes" field should not be used. Use nodeGroups.listNodes instead. * * Create a request for the method "nodeGroups.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the node group to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NodeGroup.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.nodeGroup = com.google.api.client.util.Preconditions.checkNotNull(nodeGroup, "Required parameter nodeGroup must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the node group to return. */ @com.google.api.client.util.Key private java.lang.String nodeGroup; /** Name of the node group to return. */ public java.lang.String getNodeGroup() { return nodeGroup; } /** Name of the node group to return. */ public Get setNodeGroup(java.lang.String nodeGroup) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.nodeGroup = nodeGroup; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "nodeGroups.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, zone, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "nodeGroups.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public GetIamPolicy setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a NodeGroup resource in the specified project using the data included in the request. * * Create a request for the method "nodeGroups.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param initialNodeCount Initial count of nodes in the node group. * @param content the {@link com.google.api.services.compute.model.NodeGroup} * @return the request */ public Insert insert(java.lang.String project, java.lang.String zone, java.lang.Integer initialNodeCount, com.google.api.services.compute.model.NodeGroup content) throws java.io.IOException { Insert result = new Insert(project, zone, initialNodeCount, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeGroups"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a NodeGroup resource in the specified project using the data included in the request. * * Create a request for the method "nodeGroups.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param initialNodeCount Initial count of nodes in the node group. * @param content the {@link com.google.api.services.compute.model.NodeGroup} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String zone, java.lang.Integer initialNodeCount, com.google.api.services.compute.model.NodeGroup content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.initialNodeCount = com.google.api.client.util.Preconditions.checkNotNull(initialNodeCount, "Required parameter initialNodeCount must be specified."); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Insert setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Initial count of nodes in the node group. */ @com.google.api.client.util.Key private java.lang.Integer initialNodeCount; /** Initial count of nodes in the node group. */ public java.lang.Integer getInitialNodeCount() { return initialNodeCount; } /** Initial count of nodes in the node group. */ public Insert setInitialNodeCount(java.lang.Integer initialNodeCount) { this.initialNodeCount = initialNodeCount; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of node groups available to the specified project. Note: use * nodeGroups.listNodes for more details about each group. * * Create a request for the method "nodeGroups.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeGroups"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of node groups available to the specified project. Note: use * nodeGroups.listNodes for more details about each group. * * Create a request for the method "nodeGroups.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NodeGroupList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public List setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Lists nodes in the node group. * * Create a request for the method "nodeGroups.listNodes". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListNodes#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the NodeGroup resource whose nodes you want to list. * @return the request */ public ListNodes listNodes(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup) throws java.io.IOException { ListNodes result = new ListNodes(project, zone, nodeGroup); initialize(result); return result; } public class ListNodes extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/listNodes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NODE_GROUP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Lists nodes in the node group. * * Create a request for the method "nodeGroups.listNodes". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListNodes#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the NodeGroup resource whose nodes you want to list. * @since 1.13 */ protected ListNodes(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.NodeGroupsListNodes.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.nodeGroup = com.google.api.client.util.Preconditions.checkNotNull(nodeGroup, "Required parameter nodeGroup must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public ListNodes set$Xgafv(java.lang.String $Xgafv) { return (ListNodes) super.set$Xgafv($Xgafv); } @Override public ListNodes setAccessToken(java.lang.String accessToken) { return (ListNodes) super.setAccessToken(accessToken); } @Override public ListNodes setAlt(java.lang.String alt) { return (ListNodes) super.setAlt(alt); } @Override public ListNodes setCallback(java.lang.String callback) { return (ListNodes) super.setCallback(callback); } @Override public ListNodes setFields(java.lang.String fields) { return (ListNodes) super.setFields(fields); } @Override public ListNodes setKey(java.lang.String key) { return (ListNodes) super.setKey(key); } @Override public ListNodes setOauthToken(java.lang.String oauthToken) { return (ListNodes) super.setOauthToken(oauthToken); } @Override public ListNodes setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListNodes) super.setPrettyPrint(prettyPrint); } @Override public ListNodes setQuotaUser(java.lang.String quotaUser) { return (ListNodes) super.setQuotaUser(quotaUser); } @Override public ListNodes setUploadType(java.lang.String uploadType) { return (ListNodes) super.setUploadType(uploadType); } @Override public ListNodes setUploadProtocol(java.lang.String uploadProtocol) { return (ListNodes) super.setUploadProtocol(uploadProtocol); } @Override public ListNodes setUserIp(java.lang.String userIp) { return (ListNodes) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListNodes setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public ListNodes setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the NodeGroup resource whose nodes you want to list. */ @com.google.api.client.util.Key private java.lang.String nodeGroup; /** Name of the NodeGroup resource whose nodes you want to list. */ public java.lang.String getNodeGroup() { return nodeGroup; } /** Name of the NodeGroup resource whose nodes you want to list. */ public ListNodes setNodeGroup(java.lang.String nodeGroup) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.nodeGroup = nodeGroup; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListNodes setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListNodes setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListNodes setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListNodes setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListNodes setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListNodes set(String parameterName, Object value) { return (ListNodes) super.set(parameterName, value); } } /** * Updates the specified node group. * * Create a request for the method "nodeGroups.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the NodeGroup resource to update. * @param content the {@link com.google.api.services.compute.model.NodeGroup} * @return the request */ public Patch patch(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup, com.google.api.services.compute.model.NodeGroup content) throws java.io.IOException { Patch result = new Patch(project, zone, nodeGroup, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NODE_GROUP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified node group. * * Create a request for the method "nodeGroups.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the NodeGroup resource to update. * @param content the {@link com.google.api.services.compute.model.NodeGroup} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup, com.google.api.services.compute.model.NodeGroup content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.nodeGroup = com.google.api.client.util.Preconditions.checkNotNull(nodeGroup, "Required parameter nodeGroup must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Patch setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the NodeGroup resource to update. */ @com.google.api.client.util.Key private java.lang.String nodeGroup; /** Name of the NodeGroup resource to update. */ public java.lang.String getNodeGroup() { return nodeGroup; } /** Name of the NodeGroup resource to update. */ public Patch setNodeGroup(java.lang.String nodeGroup) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.nodeGroup = nodeGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Perform maintenance on a subset of nodes in the node group. * * Create a request for the method "nodeGroups.performMaintenance". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link PerformMaintenance#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the node group scoping this request. * @param content the {@link com.google.api.services.compute.model.NodeGroupsPerformMaintenanceRequest} * @return the request */ public PerformMaintenance performMaintenance(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup, com.google.api.services.compute.model.NodeGroupsPerformMaintenanceRequest content) throws java.io.IOException { PerformMaintenance result = new PerformMaintenance(project, zone, nodeGroup, content); initialize(result); return result; } public class PerformMaintenance extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/performMaintenance"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NODE_GROUP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Perform maintenance on a subset of nodes in the node group. * * Create a request for the method "nodeGroups.performMaintenance". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link PerformMaintenance#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the node group scoping this request. * @param content the {@link com.google.api.services.compute.model.NodeGroupsPerformMaintenanceRequest} * @since 1.13 */ protected PerformMaintenance(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup, com.google.api.services.compute.model.NodeGroupsPerformMaintenanceRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.nodeGroup = com.google.api.client.util.Preconditions.checkNotNull(nodeGroup, "Required parameter nodeGroup must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public PerformMaintenance set$Xgafv(java.lang.String $Xgafv) { return (PerformMaintenance) super.set$Xgafv($Xgafv); } @Override public PerformMaintenance setAccessToken(java.lang.String accessToken) { return (PerformMaintenance) super.setAccessToken(accessToken); } @Override public PerformMaintenance setAlt(java.lang.String alt) { return (PerformMaintenance) super.setAlt(alt); } @Override public PerformMaintenance setCallback(java.lang.String callback) { return (PerformMaintenance) super.setCallback(callback); } @Override public PerformMaintenance setFields(java.lang.String fields) { return (PerformMaintenance) super.setFields(fields); } @Override public PerformMaintenance setKey(java.lang.String key) { return (PerformMaintenance) super.setKey(key); } @Override public PerformMaintenance setOauthToken(java.lang.String oauthToken) { return (PerformMaintenance) super.setOauthToken(oauthToken); } @Override public PerformMaintenance setPrettyPrint(java.lang.Boolean prettyPrint) { return (PerformMaintenance) super.setPrettyPrint(prettyPrint); } @Override public PerformMaintenance setQuotaUser(java.lang.String quotaUser) { return (PerformMaintenance) super.setQuotaUser(quotaUser); } @Override public PerformMaintenance setUploadType(java.lang.String uploadType) { return (PerformMaintenance) super.setUploadType(uploadType); } @Override public PerformMaintenance setUploadProtocol(java.lang.String uploadProtocol) { return (PerformMaintenance) super.setUploadProtocol(uploadProtocol); } @Override public PerformMaintenance setUserIp(java.lang.String userIp) { return (PerformMaintenance) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public PerformMaintenance setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public PerformMaintenance setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the node group scoping this request. */ @com.google.api.client.util.Key private java.lang.String nodeGroup; /** Name of the node group scoping this request. */ public java.lang.String getNodeGroup() { return nodeGroup; } /** Name of the node group scoping this request. */ public PerformMaintenance setNodeGroup(java.lang.String nodeGroup) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.nodeGroup = nodeGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public PerformMaintenance setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public PerformMaintenance set(String parameterName, Object value) { return (PerformMaintenance) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "nodeGroups.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, zone, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "nodeGroups.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetIamPolicy setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Updates the node template of the node group. * * Create a request for the method "nodeGroups.setNodeTemplate". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetNodeTemplate#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the NodeGroup resource to update. * @param content the {@link com.google.api.services.compute.model.NodeGroupsSetNodeTemplateRequest} * @return the request */ public SetNodeTemplate setNodeTemplate(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup, com.google.api.services.compute.model.NodeGroupsSetNodeTemplateRequest content) throws java.io.IOException { SetNodeTemplate result = new SetNodeTemplate(project, zone, nodeGroup, content); initialize(result); return result; } public class SetNodeTemplate extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/setNodeTemplate"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NODE_GROUP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the node template of the node group. * * Create a request for the method "nodeGroups.setNodeTemplate". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetNodeTemplate#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the NodeGroup resource to update. * @param content the {@link com.google.api.services.compute.model.NodeGroupsSetNodeTemplateRequest} * @since 1.13 */ protected SetNodeTemplate(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup, com.google.api.services.compute.model.NodeGroupsSetNodeTemplateRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.nodeGroup = com.google.api.client.util.Preconditions.checkNotNull(nodeGroup, "Required parameter nodeGroup must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetNodeTemplate set$Xgafv(java.lang.String $Xgafv) { return (SetNodeTemplate) super.set$Xgafv($Xgafv); } @Override public SetNodeTemplate setAccessToken(java.lang.String accessToken) { return (SetNodeTemplate) super.setAccessToken(accessToken); } @Override public SetNodeTemplate setAlt(java.lang.String alt) { return (SetNodeTemplate) super.setAlt(alt); } @Override public SetNodeTemplate setCallback(java.lang.String callback) { return (SetNodeTemplate) super.setCallback(callback); } @Override public SetNodeTemplate setFields(java.lang.String fields) { return (SetNodeTemplate) super.setFields(fields); } @Override public SetNodeTemplate setKey(java.lang.String key) { return (SetNodeTemplate) super.setKey(key); } @Override public SetNodeTemplate setOauthToken(java.lang.String oauthToken) { return (SetNodeTemplate) super.setOauthToken(oauthToken); } @Override public SetNodeTemplate setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetNodeTemplate) super.setPrettyPrint(prettyPrint); } @Override public SetNodeTemplate setQuotaUser(java.lang.String quotaUser) { return (SetNodeTemplate) super.setQuotaUser(quotaUser); } @Override public SetNodeTemplate setUploadType(java.lang.String uploadType) { return (SetNodeTemplate) super.setUploadType(uploadType); } @Override public SetNodeTemplate setUploadProtocol(java.lang.String uploadProtocol) { return (SetNodeTemplate) super.setUploadProtocol(uploadProtocol); } @Override public SetNodeTemplate setUserIp(java.lang.String userIp) { return (SetNodeTemplate) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetNodeTemplate setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetNodeTemplate setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the NodeGroup resource to update. */ @com.google.api.client.util.Key private java.lang.String nodeGroup; /** Name of the NodeGroup resource to update. */ public java.lang.String getNodeGroup() { return nodeGroup; } /** Name of the NodeGroup resource to update. */ public SetNodeTemplate setNodeGroup(java.lang.String nodeGroup) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.nodeGroup = nodeGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetNodeTemplate setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetNodeTemplate set(String parameterName, Object value) { return (SetNodeTemplate) super.set(parameterName, value); } } /** * Simulates maintenance event on specified nodes from the node group. * * Create a request for the method "nodeGroups.simulateMaintenanceEvent". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SimulateMaintenanceEvent#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the NodeGroup resource whose nodes will go under maintenance simulation. * @param content the {@link com.google.api.services.compute.model.NodeGroupsSimulateMaintenanceEventRequest} * @return the request */ public SimulateMaintenanceEvent simulateMaintenanceEvent(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup, com.google.api.services.compute.model.NodeGroupsSimulateMaintenanceEventRequest content) throws java.io.IOException { SimulateMaintenanceEvent result = new SimulateMaintenanceEvent(project, zone, nodeGroup, content); initialize(result); return result; } public class SimulateMaintenanceEvent extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/simulateMaintenanceEvent"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NODE_GROUP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Simulates maintenance event on specified nodes from the node group. * * Create a request for the method "nodeGroups.simulateMaintenanceEvent". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SimulateMaintenanceEvent#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeGroup Name of the NodeGroup resource whose nodes will go under maintenance simulation. * @param content the {@link com.google.api.services.compute.model.NodeGroupsSimulateMaintenanceEventRequest} * @since 1.13 */ protected SimulateMaintenanceEvent(java.lang.String project, java.lang.String zone, java.lang.String nodeGroup, com.google.api.services.compute.model.NodeGroupsSimulateMaintenanceEventRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.nodeGroup = com.google.api.client.util.Preconditions.checkNotNull(nodeGroup, "Required parameter nodeGroup must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SimulateMaintenanceEvent set$Xgafv(java.lang.String $Xgafv) { return (SimulateMaintenanceEvent) super.set$Xgafv($Xgafv); } @Override public SimulateMaintenanceEvent setAccessToken(java.lang.String accessToken) { return (SimulateMaintenanceEvent) super.setAccessToken(accessToken); } @Override public SimulateMaintenanceEvent setAlt(java.lang.String alt) { return (SimulateMaintenanceEvent) super.setAlt(alt); } @Override public SimulateMaintenanceEvent setCallback(java.lang.String callback) { return (SimulateMaintenanceEvent) super.setCallback(callback); } @Override public SimulateMaintenanceEvent setFields(java.lang.String fields) { return (SimulateMaintenanceEvent) super.setFields(fields); } @Override public SimulateMaintenanceEvent setKey(java.lang.String key) { return (SimulateMaintenanceEvent) super.setKey(key); } @Override public SimulateMaintenanceEvent setOauthToken(java.lang.String oauthToken) { return (SimulateMaintenanceEvent) super.setOauthToken(oauthToken); } @Override public SimulateMaintenanceEvent setPrettyPrint(java.lang.Boolean prettyPrint) { return (SimulateMaintenanceEvent) super.setPrettyPrint(prettyPrint); } @Override public SimulateMaintenanceEvent setQuotaUser(java.lang.String quotaUser) { return (SimulateMaintenanceEvent) super.setQuotaUser(quotaUser); } @Override public SimulateMaintenanceEvent setUploadType(java.lang.String uploadType) { return (SimulateMaintenanceEvent) super.setUploadType(uploadType); } @Override public SimulateMaintenanceEvent setUploadProtocol(java.lang.String uploadProtocol) { return (SimulateMaintenanceEvent) super.setUploadProtocol(uploadProtocol); } @Override public SimulateMaintenanceEvent setUserIp(java.lang.String userIp) { return (SimulateMaintenanceEvent) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SimulateMaintenanceEvent setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SimulateMaintenanceEvent setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the NodeGroup resource whose nodes will go under maintenance simulation. */ @com.google.api.client.util.Key private java.lang.String nodeGroup; /** Name of the NodeGroup resource whose nodes will go under maintenance simulation. */ public java.lang.String getNodeGroup() { return nodeGroup; } /** Name of the NodeGroup resource whose nodes will go under maintenance simulation. */ public SimulateMaintenanceEvent setNodeGroup(java.lang.String nodeGroup) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_GROUP_PATTERN.matcher(nodeGroup).matches(), "Parameter nodeGroup must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.nodeGroup = nodeGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SimulateMaintenanceEvent setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SimulateMaintenanceEvent set(String parameterName, Object value) { return (SimulateMaintenanceEvent) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "nodeGroups.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, zone, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "nodeGroups.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public TestIamPermissions setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the NodeTemplates collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.NodeTemplates.List request = compute.nodeTemplates().list(parameters ...)}
   * 
* * @return the resource collection */ public NodeTemplates nodeTemplates() { return new NodeTemplates(); } /** * The "nodeTemplates" collection of methods. */ public class NodeTemplates { /** * Retrieves an aggregated list of node templates. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "nodeTemplates.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/nodeTemplates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of node templates. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "nodeTemplates.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NodeTemplateAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified NodeTemplate resource. * * Create a request for the method "nodeTemplates.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param nodeTemplate Name of the NodeTemplate resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String nodeTemplate) throws java.io.IOException { Delete result = new Delete(project, region, nodeTemplate); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NODE_TEMPLATE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified NodeTemplate resource. * * Create a request for the method "nodeTemplates.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region The name of the region for this request. * @param nodeTemplate Name of the NodeTemplate resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String nodeTemplate) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.nodeTemplate = com.google.api.client.util.Preconditions.checkNotNull(nodeTemplate, "Required parameter nodeTemplate must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_TEMPLATE_PATTERN.matcher(nodeTemplate).matches(), "Parameter nodeTemplate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the NodeTemplate resource to delete. */ @com.google.api.client.util.Key private java.lang.String nodeTemplate; /** Name of the NodeTemplate resource to delete. */ public java.lang.String getNodeTemplate() { return nodeTemplate; } /** Name of the NodeTemplate resource to delete. */ public Delete setNodeTemplate(java.lang.String nodeTemplate) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_TEMPLATE_PATTERN.matcher(nodeTemplate).matches(), "Parameter nodeTemplate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.nodeTemplate = nodeTemplate; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified node template. * * Create a request for the method "nodeTemplates.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param nodeTemplate Name of the node template to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String nodeTemplate) throws java.io.IOException { Get result = new Get(project, region, nodeTemplate); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NODE_TEMPLATE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified node template. * * Create a request for the method "nodeTemplates.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region The name of the region for this request. * @param nodeTemplate Name of the node template to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String nodeTemplate) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NodeTemplate.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.nodeTemplate = com.google.api.client.util.Preconditions.checkNotNull(nodeTemplate, "Required parameter nodeTemplate must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_TEMPLATE_PATTERN.matcher(nodeTemplate).matches(), "Parameter nodeTemplate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the node template to return. */ @com.google.api.client.util.Key private java.lang.String nodeTemplate; /** Name of the node template to return. */ public java.lang.String getNodeTemplate() { return nodeTemplate; } /** Name of the node template to return. */ public Get setNodeTemplate(java.lang.String nodeTemplate) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_TEMPLATE_PATTERN.matcher(nodeTemplate).matches(), "Parameter nodeTemplate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.nodeTemplate = nodeTemplate; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "nodeTemplates.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, region, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "nodeTemplates.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public GetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a NodeTemplate resource in the specified project using the data included in the request. * * Create a request for the method "nodeTemplates.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param content the {@link com.google.api.services.compute.model.NodeTemplate} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.NodeTemplate content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/nodeTemplates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a NodeTemplate resource in the specified project using the data included in the * request. * * Create a request for the method "nodeTemplates.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param content the {@link com.google.api.services.compute.model.NodeTemplate} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.NodeTemplate content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of node templates available to the specified project. * * Create a request for the method "nodeTemplates.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/nodeTemplates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of node templates available to the specified project. * * Create a request for the method "nodeTemplates.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region The name of the region for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NodeTemplateList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "nodeTemplates.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, region, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "nodeTemplates.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public SetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "nodeTemplates.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, region, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "nodeTemplates.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public TestIamPermissions setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the NodeTypes collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.NodeTypes.List request = compute.nodeTypes().list(parameters ...)}
   * 
* * @return the resource collection */ public NodeTypes nodeTypes() { return new NodeTypes(); } /** * The "nodeTypes" collection of methods. */ public class NodeTypes { /** * Retrieves an aggregated list of node types. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "nodeTypes.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/nodeTypes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of node types. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "nodeTypes.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NodeTypeAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Returns the specified node type. * * Create a request for the method "nodeTypes.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeType Name of the node type to return. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String nodeType) throws java.io.IOException { Get result = new Get(project, zone, nodeType); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeTypes/{nodeType}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NODE_TYPE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified node type. * * Create a request for the method "nodeTypes.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param nodeType Name of the node type to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String nodeType) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NodeType.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.nodeType = com.google.api.client.util.Preconditions.checkNotNull(nodeType, "Required parameter nodeType must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_TYPE_PATTERN.matcher(nodeType).matches(), "Parameter nodeType must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the node type to return. */ @com.google.api.client.util.Key private java.lang.String nodeType; /** Name of the node type to return. */ public java.lang.String getNodeType() { return nodeType; } /** Name of the node type to return. */ public Get setNodeType(java.lang.String nodeType) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NODE_TYPE_PATTERN.matcher(nodeType).matches(), "Parameter nodeType must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.nodeType = nodeType; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves a list of node types available to the specified project. * * Create a request for the method "nodeTypes.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/nodeTypes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of node types available to the specified project. * * Create a request for the method "nodeTypes.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NodeTypeList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public List setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the PacketMirrorings collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.PacketMirrorings.List request = compute.packetMirrorings().list(parameters ...)}
   * 
* * @return the resource collection */ public PacketMirrorings packetMirrorings() { return new PacketMirrorings(); } /** * The "packetMirrorings" collection of methods. */ public class PacketMirrorings { /** * Retrieves an aggregated list of packetMirrorings. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "packetMirrorings.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/packetMirrorings"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of packetMirrorings. To prevent failure, Google recommends that * you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "packetMirrorings.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.PacketMirroringAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified PacketMirroring resource. * * Create a request for the method "packetMirrorings.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param packetMirroring Name of the PacketMirroring resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String packetMirroring) throws java.io.IOException { Delete result = new Delete(project, region, packetMirroring); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern PACKET_MIRRORING_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified PacketMirroring resource. * * Create a request for the method "packetMirrorings.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param packetMirroring Name of the PacketMirroring resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String packetMirroring) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.packetMirroring = com.google.api.client.util.Preconditions.checkNotNull(packetMirroring, "Required parameter packetMirroring must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PACKET_MIRRORING_PATTERN.matcher(packetMirroring).matches(), "Parameter packetMirroring must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the PacketMirroring resource to delete. */ @com.google.api.client.util.Key private java.lang.String packetMirroring; /** Name of the PacketMirroring resource to delete. */ public java.lang.String getPacketMirroring() { return packetMirroring; } /** Name of the PacketMirroring resource to delete. */ public Delete setPacketMirroring(java.lang.String packetMirroring) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PACKET_MIRRORING_PATTERN.matcher(packetMirroring).matches(), "Parameter packetMirroring must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.packetMirroring = packetMirroring; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified PacketMirroring resource. * * Create a request for the method "packetMirrorings.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param packetMirroring Name of the PacketMirroring resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String packetMirroring) throws java.io.IOException { Get result = new Get(project, region, packetMirroring); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern PACKET_MIRRORING_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified PacketMirroring resource. * * Create a request for the method "packetMirrorings.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param packetMirroring Name of the PacketMirroring resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String packetMirroring) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.PacketMirroring.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.packetMirroring = com.google.api.client.util.Preconditions.checkNotNull(packetMirroring, "Required parameter packetMirroring must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PACKET_MIRRORING_PATTERN.matcher(packetMirroring).matches(), "Parameter packetMirroring must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the PacketMirroring resource to return. */ @com.google.api.client.util.Key private java.lang.String packetMirroring; /** Name of the PacketMirroring resource to return. */ public java.lang.String getPacketMirroring() { return packetMirroring; } /** Name of the PacketMirroring resource to return. */ public Get setPacketMirroring(java.lang.String packetMirroring) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PACKET_MIRRORING_PATTERN.matcher(packetMirroring).matches(), "Parameter packetMirroring must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.packetMirroring = packetMirroring; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a PacketMirroring resource in the specified project and region using the data included in * the request. * * Create a request for the method "packetMirrorings.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.PacketMirroring} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.PacketMirroring content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/packetMirrorings"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a PacketMirroring resource in the specified project and region using the data included * in the request. * * Create a request for the method "packetMirrorings.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.PacketMirroring} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.PacketMirroring content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of PacketMirroring resources available to the specified project and region. * * Create a request for the method "packetMirrorings.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/packetMirrorings"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of PacketMirroring resources available to the specified project and region. * * Create a request for the method "packetMirrorings.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.PacketMirroringList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified PacketMirroring resource with the data included in the request. This method * supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "packetMirrorings.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param packetMirroring Name of the PacketMirroring resource to patch. * @param content the {@link com.google.api.services.compute.model.PacketMirroring} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String packetMirroring, com.google.api.services.compute.model.PacketMirroring content) throws java.io.IOException { Patch result = new Patch(project, region, packetMirroring, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern PACKET_MIRRORING_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified PacketMirroring resource with the data included in the request. This * method supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "packetMirrorings.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param packetMirroring Name of the PacketMirroring resource to patch. * @param content the {@link com.google.api.services.compute.model.PacketMirroring} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String packetMirroring, com.google.api.services.compute.model.PacketMirroring content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.packetMirroring = com.google.api.client.util.Preconditions.checkNotNull(packetMirroring, "Required parameter packetMirroring must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PACKET_MIRRORING_PATTERN.matcher(packetMirroring).matches(), "Parameter packetMirroring must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the PacketMirroring resource to patch. */ @com.google.api.client.util.Key private java.lang.String packetMirroring; /** Name of the PacketMirroring resource to patch. */ public java.lang.String getPacketMirroring() { return packetMirroring; } /** Name of the PacketMirroring resource to patch. */ public Patch setPacketMirroring(java.lang.String packetMirroring) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PACKET_MIRRORING_PATTERN.matcher(packetMirroring).matches(), "Parameter packetMirroring must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.packetMirroring = packetMirroring; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "packetMirrorings.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, region, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "packetMirrorings.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public TestIamPermissions setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Projects collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Projects.List request = compute.projects().list(parameters ...)}
   * 
* * @return the resource collection */ public Projects projects() { return new Projects(); } /** * The "projects" collection of methods. */ public class Projects { /** * Disable this project as a shared VPC host project. * * Create a request for the method "projects.disableXpnHost". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link DisableXpnHost#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public DisableXpnHost disableXpnHost(java.lang.String project) throws java.io.IOException { DisableXpnHost result = new DisableXpnHost(project); initialize(result); return result; } public class DisableXpnHost extends ComputeRequest { private static final String REST_PATH = "projects/{project}/disableXpnHost"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Disable this project as a shared VPC host project. * * Create a request for the method "projects.disableXpnHost". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link DisableXpnHost#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected DisableXpnHost(java.lang.String project) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public DisableXpnHost set$Xgafv(java.lang.String $Xgafv) { return (DisableXpnHost) super.set$Xgafv($Xgafv); } @Override public DisableXpnHost setAccessToken(java.lang.String accessToken) { return (DisableXpnHost) super.setAccessToken(accessToken); } @Override public DisableXpnHost setAlt(java.lang.String alt) { return (DisableXpnHost) super.setAlt(alt); } @Override public DisableXpnHost setCallback(java.lang.String callback) { return (DisableXpnHost) super.setCallback(callback); } @Override public DisableXpnHost setFields(java.lang.String fields) { return (DisableXpnHost) super.setFields(fields); } @Override public DisableXpnHost setKey(java.lang.String key) { return (DisableXpnHost) super.setKey(key); } @Override public DisableXpnHost setOauthToken(java.lang.String oauthToken) { return (DisableXpnHost) super.setOauthToken(oauthToken); } @Override public DisableXpnHost setPrettyPrint(java.lang.Boolean prettyPrint) { return (DisableXpnHost) super.setPrettyPrint(prettyPrint); } @Override public DisableXpnHost setQuotaUser(java.lang.String quotaUser) { return (DisableXpnHost) super.setQuotaUser(quotaUser); } @Override public DisableXpnHost setUploadType(java.lang.String uploadType) { return (DisableXpnHost) super.setUploadType(uploadType); } @Override public DisableXpnHost setUploadProtocol(java.lang.String uploadProtocol) { return (DisableXpnHost) super.setUploadProtocol(uploadProtocol); } @Override public DisableXpnHost setUserIp(java.lang.String userIp) { return (DisableXpnHost) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public DisableXpnHost setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public DisableXpnHost setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public DisableXpnHost set(String parameterName, Object value) { return (DisableXpnHost) super.set(parameterName, value); } } /** * Disable a service resource (also known as service project) associated with this host project. * * Create a request for the method "projects.disableXpnResource". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link DisableXpnResource#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.ProjectsDisableXpnResourceRequest} * @return the request */ public DisableXpnResource disableXpnResource(java.lang.String project, com.google.api.services.compute.model.ProjectsDisableXpnResourceRequest content) throws java.io.IOException { DisableXpnResource result = new DisableXpnResource(project, content); initialize(result); return result; } public class DisableXpnResource extends ComputeRequest { private static final String REST_PATH = "projects/{project}/disableXpnResource"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Disable a service resource (also known as service project) associated with this host project. * * Create a request for the method "projects.disableXpnResource". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link DisableXpnResource#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.ProjectsDisableXpnResourceRequest} * @since 1.13 */ protected DisableXpnResource(java.lang.String project, com.google.api.services.compute.model.ProjectsDisableXpnResourceRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public DisableXpnResource set$Xgafv(java.lang.String $Xgafv) { return (DisableXpnResource) super.set$Xgafv($Xgafv); } @Override public DisableXpnResource setAccessToken(java.lang.String accessToken) { return (DisableXpnResource) super.setAccessToken(accessToken); } @Override public DisableXpnResource setAlt(java.lang.String alt) { return (DisableXpnResource) super.setAlt(alt); } @Override public DisableXpnResource setCallback(java.lang.String callback) { return (DisableXpnResource) super.setCallback(callback); } @Override public DisableXpnResource setFields(java.lang.String fields) { return (DisableXpnResource) super.setFields(fields); } @Override public DisableXpnResource setKey(java.lang.String key) { return (DisableXpnResource) super.setKey(key); } @Override public DisableXpnResource setOauthToken(java.lang.String oauthToken) { return (DisableXpnResource) super.setOauthToken(oauthToken); } @Override public DisableXpnResource setPrettyPrint(java.lang.Boolean prettyPrint) { return (DisableXpnResource) super.setPrettyPrint(prettyPrint); } @Override public DisableXpnResource setQuotaUser(java.lang.String quotaUser) { return (DisableXpnResource) super.setQuotaUser(quotaUser); } @Override public DisableXpnResource setUploadType(java.lang.String uploadType) { return (DisableXpnResource) super.setUploadType(uploadType); } @Override public DisableXpnResource setUploadProtocol(java.lang.String uploadProtocol) { return (DisableXpnResource) super.setUploadProtocol(uploadProtocol); } @Override public DisableXpnResource setUserIp(java.lang.String userIp) { return (DisableXpnResource) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public DisableXpnResource setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public DisableXpnResource setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public DisableXpnResource set(String parameterName, Object value) { return (DisableXpnResource) super.set(parameterName, value); } } /** * Enable this project as a shared VPC host project. * * Create a request for the method "projects.enableXpnHost". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link EnableXpnHost#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public EnableXpnHost enableXpnHost(java.lang.String project) throws java.io.IOException { EnableXpnHost result = new EnableXpnHost(project); initialize(result); return result; } public class EnableXpnHost extends ComputeRequest { private static final String REST_PATH = "projects/{project}/enableXpnHost"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Enable this project as a shared VPC host project. * * Create a request for the method "projects.enableXpnHost". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link EnableXpnHost#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @since 1.13 */ protected EnableXpnHost(java.lang.String project) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public EnableXpnHost set$Xgafv(java.lang.String $Xgafv) { return (EnableXpnHost) super.set$Xgafv($Xgafv); } @Override public EnableXpnHost setAccessToken(java.lang.String accessToken) { return (EnableXpnHost) super.setAccessToken(accessToken); } @Override public EnableXpnHost setAlt(java.lang.String alt) { return (EnableXpnHost) super.setAlt(alt); } @Override public EnableXpnHost setCallback(java.lang.String callback) { return (EnableXpnHost) super.setCallback(callback); } @Override public EnableXpnHost setFields(java.lang.String fields) { return (EnableXpnHost) super.setFields(fields); } @Override public EnableXpnHost setKey(java.lang.String key) { return (EnableXpnHost) super.setKey(key); } @Override public EnableXpnHost setOauthToken(java.lang.String oauthToken) { return (EnableXpnHost) super.setOauthToken(oauthToken); } @Override public EnableXpnHost setPrettyPrint(java.lang.Boolean prettyPrint) { return (EnableXpnHost) super.setPrettyPrint(prettyPrint); } @Override public EnableXpnHost setQuotaUser(java.lang.String quotaUser) { return (EnableXpnHost) super.setQuotaUser(quotaUser); } @Override public EnableXpnHost setUploadType(java.lang.String uploadType) { return (EnableXpnHost) super.setUploadType(uploadType); } @Override public EnableXpnHost setUploadProtocol(java.lang.String uploadProtocol) { return (EnableXpnHost) super.setUploadProtocol(uploadProtocol); } @Override public EnableXpnHost setUserIp(java.lang.String userIp) { return (EnableXpnHost) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public EnableXpnHost setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public EnableXpnHost setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public EnableXpnHost set(String parameterName, Object value) { return (EnableXpnHost) super.set(parameterName, value); } } /** * Enable service resource (a.k.a service project) for a host project, so that subnets in the host * project can be used by instances in the service project. * * Create a request for the method "projects.enableXpnResource". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link EnableXpnResource#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.ProjectsEnableXpnResourceRequest} * @return the request */ public EnableXpnResource enableXpnResource(java.lang.String project, com.google.api.services.compute.model.ProjectsEnableXpnResourceRequest content) throws java.io.IOException { EnableXpnResource result = new EnableXpnResource(project, content); initialize(result); return result; } public class EnableXpnResource extends ComputeRequest { private static final String REST_PATH = "projects/{project}/enableXpnResource"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Enable service resource (a.k.a service project) for a host project, so that subnets in the host * project can be used by instances in the service project. * * Create a request for the method "projects.enableXpnResource". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link EnableXpnResource#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.ProjectsEnableXpnResourceRequest} * @since 1.13 */ protected EnableXpnResource(java.lang.String project, com.google.api.services.compute.model.ProjectsEnableXpnResourceRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public EnableXpnResource set$Xgafv(java.lang.String $Xgafv) { return (EnableXpnResource) super.set$Xgafv($Xgafv); } @Override public EnableXpnResource setAccessToken(java.lang.String accessToken) { return (EnableXpnResource) super.setAccessToken(accessToken); } @Override public EnableXpnResource setAlt(java.lang.String alt) { return (EnableXpnResource) super.setAlt(alt); } @Override public EnableXpnResource setCallback(java.lang.String callback) { return (EnableXpnResource) super.setCallback(callback); } @Override public EnableXpnResource setFields(java.lang.String fields) { return (EnableXpnResource) super.setFields(fields); } @Override public EnableXpnResource setKey(java.lang.String key) { return (EnableXpnResource) super.setKey(key); } @Override public EnableXpnResource setOauthToken(java.lang.String oauthToken) { return (EnableXpnResource) super.setOauthToken(oauthToken); } @Override public EnableXpnResource setPrettyPrint(java.lang.Boolean prettyPrint) { return (EnableXpnResource) super.setPrettyPrint(prettyPrint); } @Override public EnableXpnResource setQuotaUser(java.lang.String quotaUser) { return (EnableXpnResource) super.setQuotaUser(quotaUser); } @Override public EnableXpnResource setUploadType(java.lang.String uploadType) { return (EnableXpnResource) super.setUploadType(uploadType); } @Override public EnableXpnResource setUploadProtocol(java.lang.String uploadProtocol) { return (EnableXpnResource) super.setUploadProtocol(uploadProtocol); } @Override public EnableXpnResource setUserIp(java.lang.String userIp) { return (EnableXpnResource) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public EnableXpnResource setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public EnableXpnResource setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public EnableXpnResource set(String parameterName, Object value) { return (EnableXpnResource) super.set(parameterName, value); } } /** * Returns the specified Project resource. To decrease latency for this method, you can optionally * omit any unneeded information from the response by using a field mask. This practice is * especially recommended for unused quota information (the `quotas` field). To exclude one or more * fields, set your request's `fields` query parameter to only include the fields you need. For * example, to only include the `id` and `selfLink` fields, add the query parameter * `?fields=id,selfLink` to your request. * * Create a request for the method "projects.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public Get get(java.lang.String project) throws java.io.IOException { Get result = new Get(project); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Returns the specified Project resource. To decrease latency for this method, you can optionally * omit any unneeded information from the response by using a field mask. This practice is * especially recommended for unused quota information (the `quotas` field). To exclude one or * more fields, set your request's `fields` query parameter to only include the fields you need. * For example, to only include the `id` and `selfLink` fields, add the query parameter * `?fields=id,selfLink` to your request. * * Create a request for the method "projects.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected Get(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Project.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the shared VPC host project that this project links to. May be empty if no link exists. * * Create a request for the method "projects.getXpnHost". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetXpnHost#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public GetXpnHost getXpnHost(java.lang.String project) throws java.io.IOException { GetXpnHost result = new GetXpnHost(project); initialize(result); return result; } public class GetXpnHost extends ComputeRequest { private static final String REST_PATH = "projects/{project}/getXpnHost"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Gets the shared VPC host project that this project links to. May be empty if no link exists. * * Create a request for the method "projects.getXpnHost". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetXpnHost#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @since 1.13 */ protected GetXpnHost(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Project.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 GetXpnHost set$Xgafv(java.lang.String $Xgafv) { return (GetXpnHost) super.set$Xgafv($Xgafv); } @Override public GetXpnHost setAccessToken(java.lang.String accessToken) { return (GetXpnHost) super.setAccessToken(accessToken); } @Override public GetXpnHost setAlt(java.lang.String alt) { return (GetXpnHost) super.setAlt(alt); } @Override public GetXpnHost setCallback(java.lang.String callback) { return (GetXpnHost) super.setCallback(callback); } @Override public GetXpnHost setFields(java.lang.String fields) { return (GetXpnHost) super.setFields(fields); } @Override public GetXpnHost setKey(java.lang.String key) { return (GetXpnHost) super.setKey(key); } @Override public GetXpnHost setOauthToken(java.lang.String oauthToken) { return (GetXpnHost) super.setOauthToken(oauthToken); } @Override public GetXpnHost setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetXpnHost) super.setPrettyPrint(prettyPrint); } @Override public GetXpnHost setQuotaUser(java.lang.String quotaUser) { return (GetXpnHost) super.setQuotaUser(quotaUser); } @Override public GetXpnHost setUploadType(java.lang.String uploadType) { return (GetXpnHost) super.setUploadType(uploadType); } @Override public GetXpnHost setUploadProtocol(java.lang.String uploadProtocol) { return (GetXpnHost) super.setUploadProtocol(uploadProtocol); } @Override public GetXpnHost setUserIp(java.lang.String userIp) { return (GetXpnHost) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetXpnHost setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } @Override public GetXpnHost set(String parameterName, Object value) { return (GetXpnHost) super.set(parameterName, value); } } /** * Gets service resources (a.k.a service project) associated with this host project. * * Create a request for the method "projects.getXpnResources". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetXpnResources#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public GetXpnResources getXpnResources(java.lang.String project) throws java.io.IOException { GetXpnResources result = new GetXpnResources(project); initialize(result); return result; } public class GetXpnResources extends ComputeRequest { private static final String REST_PATH = "projects/{project}/getXpnResources"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Gets service resources (a.k.a service project) associated with this host project. * * Create a request for the method "projects.getXpnResources". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetXpnResources#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected GetXpnResources(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ProjectsGetXpnResources.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 GetXpnResources set$Xgafv(java.lang.String $Xgafv) { return (GetXpnResources) super.set$Xgafv($Xgafv); } @Override public GetXpnResources setAccessToken(java.lang.String accessToken) { return (GetXpnResources) super.setAccessToken(accessToken); } @Override public GetXpnResources setAlt(java.lang.String alt) { return (GetXpnResources) super.setAlt(alt); } @Override public GetXpnResources setCallback(java.lang.String callback) { return (GetXpnResources) super.setCallback(callback); } @Override public GetXpnResources setFields(java.lang.String fields) { return (GetXpnResources) super.setFields(fields); } @Override public GetXpnResources setKey(java.lang.String key) { return (GetXpnResources) super.setKey(key); } @Override public GetXpnResources setOauthToken(java.lang.String oauthToken) { return (GetXpnResources) super.setOauthToken(oauthToken); } @Override public GetXpnResources setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetXpnResources) super.setPrettyPrint(prettyPrint); } @Override public GetXpnResources setQuotaUser(java.lang.String quotaUser) { return (GetXpnResources) super.setQuotaUser(quotaUser); } @Override public GetXpnResources setUploadType(java.lang.String uploadType) { return (GetXpnResources) super.setUploadType(uploadType); } @Override public GetXpnResources setUploadProtocol(java.lang.String uploadProtocol) { return (GetXpnResources) super.setUploadProtocol(uploadProtocol); } @Override public GetXpnResources setUserIp(java.lang.String userIp) { return (GetXpnResources) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetXpnResources setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public GetXpnResources setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public GetXpnResources setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public GetXpnResources setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public GetXpnResources setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public GetXpnResources setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public GetXpnResources set(String parameterName, Object value) { return (GetXpnResources) super.set(parameterName, value); } } /** * Lists all shared VPC host projects visible to the user in an organization. * * Create a request for the method "projects.listXpnHosts". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListXpnHosts#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.ProjectsListXpnHostsRequest} * @return the request */ public ListXpnHosts listXpnHosts(java.lang.String project, com.google.api.services.compute.model.ProjectsListXpnHostsRequest content) throws java.io.IOException { ListXpnHosts result = new ListXpnHosts(project, content); initialize(result); return result; } public class ListXpnHosts extends ComputeRequest { private static final String REST_PATH = "projects/{project}/listXpnHosts"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists all shared VPC host projects visible to the user in an organization. * * Create a request for the method "projects.listXpnHosts". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListXpnHosts#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.ProjectsListXpnHostsRequest} * @since 1.13 */ protected ListXpnHosts(java.lang.String project, com.google.api.services.compute.model.ProjectsListXpnHostsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.XpnHostList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public ListXpnHosts set$Xgafv(java.lang.String $Xgafv) { return (ListXpnHosts) super.set$Xgafv($Xgafv); } @Override public ListXpnHosts setAccessToken(java.lang.String accessToken) { return (ListXpnHosts) super.setAccessToken(accessToken); } @Override public ListXpnHosts setAlt(java.lang.String alt) { return (ListXpnHosts) super.setAlt(alt); } @Override public ListXpnHosts setCallback(java.lang.String callback) { return (ListXpnHosts) super.setCallback(callback); } @Override public ListXpnHosts setFields(java.lang.String fields) { return (ListXpnHosts) super.setFields(fields); } @Override public ListXpnHosts setKey(java.lang.String key) { return (ListXpnHosts) super.setKey(key); } @Override public ListXpnHosts setOauthToken(java.lang.String oauthToken) { return (ListXpnHosts) super.setOauthToken(oauthToken); } @Override public ListXpnHosts setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListXpnHosts) super.setPrettyPrint(prettyPrint); } @Override public ListXpnHosts setQuotaUser(java.lang.String quotaUser) { return (ListXpnHosts) super.setQuotaUser(quotaUser); } @Override public ListXpnHosts setUploadType(java.lang.String uploadType) { return (ListXpnHosts) super.setUploadType(uploadType); } @Override public ListXpnHosts setUploadProtocol(java.lang.String uploadProtocol) { return (ListXpnHosts) super.setUploadProtocol(uploadProtocol); } @Override public ListXpnHosts setUserIp(java.lang.String userIp) { return (ListXpnHosts) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListXpnHosts setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListXpnHosts setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListXpnHosts setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListXpnHosts setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListXpnHosts setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListXpnHosts setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListXpnHosts set(String parameterName, Object value) { return (ListXpnHosts) super.set(parameterName, value); } } /** * Moves a persistent disk from one zone to another. * * Create a request for the method "projects.moveDisk". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link MoveDisk#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.DiskMoveRequest} * @return the request */ public MoveDisk moveDisk(java.lang.String project, com.google.api.services.compute.model.DiskMoveRequest content) throws java.io.IOException { MoveDisk result = new MoveDisk(project, content); initialize(result); return result; } public class MoveDisk extends ComputeRequest { private static final String REST_PATH = "projects/{project}/moveDisk"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Moves a persistent disk from one zone to another. * * Create a request for the method "projects.moveDisk". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link MoveDisk#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.DiskMoveRequest} * @since 1.13 */ protected MoveDisk(java.lang.String project, com.google.api.services.compute.model.DiskMoveRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public MoveDisk set$Xgafv(java.lang.String $Xgafv) { return (MoveDisk) super.set$Xgafv($Xgafv); } @Override public MoveDisk setAccessToken(java.lang.String accessToken) { return (MoveDisk) super.setAccessToken(accessToken); } @Override public MoveDisk setAlt(java.lang.String alt) { return (MoveDisk) super.setAlt(alt); } @Override public MoveDisk setCallback(java.lang.String callback) { return (MoveDisk) super.setCallback(callback); } @Override public MoveDisk setFields(java.lang.String fields) { return (MoveDisk) super.setFields(fields); } @Override public MoveDisk setKey(java.lang.String key) { return (MoveDisk) super.setKey(key); } @Override public MoveDisk setOauthToken(java.lang.String oauthToken) { return (MoveDisk) super.setOauthToken(oauthToken); } @Override public MoveDisk setPrettyPrint(java.lang.Boolean prettyPrint) { return (MoveDisk) super.setPrettyPrint(prettyPrint); } @Override public MoveDisk setQuotaUser(java.lang.String quotaUser) { return (MoveDisk) super.setQuotaUser(quotaUser); } @Override public MoveDisk setUploadType(java.lang.String uploadType) { return (MoveDisk) super.setUploadType(uploadType); } @Override public MoveDisk setUploadProtocol(java.lang.String uploadProtocol) { return (MoveDisk) super.setUploadProtocol(uploadProtocol); } @Override public MoveDisk setUserIp(java.lang.String userIp) { return (MoveDisk) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public MoveDisk setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public MoveDisk setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public MoveDisk set(String parameterName, Object value) { return (MoveDisk) super.set(parameterName, value); } } /** * Moves an instance and its attached persistent disks from one zone to another. *Note*: Moving VMs * or disks by using this method might cause unexpected behavior. For more information, see the * [known issue](/compute/docs/troubleshooting/known- * issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior). * [Deprecated] This method is deprecated. See [moving instance across * zones](/compute/docs/instances/moving-instance-across-zones) instead. * * Create a request for the method "projects.moveInstance". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link MoveInstance#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.InstanceMoveRequest} * @return the request */ public MoveInstance moveInstance(java.lang.String project, com.google.api.services.compute.model.InstanceMoveRequest content) throws java.io.IOException { MoveInstance result = new MoveInstance(project, content); initialize(result); return result; } public class MoveInstance extends ComputeRequest { private static final String REST_PATH = "projects/{project}/moveInstance"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Moves an instance and its attached persistent disks from one zone to another. *Note*: Moving * VMs or disks by using this method might cause unexpected behavior. For more information, see * the [known issue](/compute/docs/troubleshooting/known- * issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior). * [Deprecated] This method is deprecated. See [moving instance across * zones](/compute/docs/instances/moving-instance-across-zones) instead. * * Create a request for the method "projects.moveInstance". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link MoveInstance#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.InstanceMoveRequest} * @since 1.13 */ protected MoveInstance(java.lang.String project, com.google.api.services.compute.model.InstanceMoveRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public MoveInstance set$Xgafv(java.lang.String $Xgafv) { return (MoveInstance) super.set$Xgafv($Xgafv); } @Override public MoveInstance setAccessToken(java.lang.String accessToken) { return (MoveInstance) super.setAccessToken(accessToken); } @Override public MoveInstance setAlt(java.lang.String alt) { return (MoveInstance) super.setAlt(alt); } @Override public MoveInstance setCallback(java.lang.String callback) { return (MoveInstance) super.setCallback(callback); } @Override public MoveInstance setFields(java.lang.String fields) { return (MoveInstance) super.setFields(fields); } @Override public MoveInstance setKey(java.lang.String key) { return (MoveInstance) super.setKey(key); } @Override public MoveInstance setOauthToken(java.lang.String oauthToken) { return (MoveInstance) super.setOauthToken(oauthToken); } @Override public MoveInstance setPrettyPrint(java.lang.Boolean prettyPrint) { return (MoveInstance) super.setPrettyPrint(prettyPrint); } @Override public MoveInstance setQuotaUser(java.lang.String quotaUser) { return (MoveInstance) super.setQuotaUser(quotaUser); } @Override public MoveInstance setUploadType(java.lang.String uploadType) { return (MoveInstance) super.setUploadType(uploadType); } @Override public MoveInstance setUploadProtocol(java.lang.String uploadProtocol) { return (MoveInstance) super.setUploadProtocol(uploadProtocol); } @Override public MoveInstance setUserIp(java.lang.String userIp) { return (MoveInstance) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public MoveInstance setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public MoveInstance setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public MoveInstance set(String parameterName, Object value) { return (MoveInstance) super.set(parameterName, value); } } /** * Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the * project must be subscribed to Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise * for more information. * * Create a request for the method "projects.setCloudArmorTier". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetCloudArmorTier#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.ProjectsSetCloudArmorTierRequest} * @return the request */ public SetCloudArmorTier setCloudArmorTier(java.lang.String project, com.google.api.services.compute.model.ProjectsSetCloudArmorTierRequest content) throws java.io.IOException { SetCloudArmorTier result = new SetCloudArmorTier(project, content); initialize(result); return result; } public class SetCloudArmorTier extends ComputeRequest { private static final String REST_PATH = "projects/{project}/setCloudArmorTier"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the * project must be subscribed to Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise * for more information. * * Create a request for the method "projects.setCloudArmorTier". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetCloudArmorTier#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.ProjectsSetCloudArmorTierRequest} * @since 1.13 */ protected SetCloudArmorTier(java.lang.String project, com.google.api.services.compute.model.ProjectsSetCloudArmorTierRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public SetCloudArmorTier set$Xgafv(java.lang.String $Xgafv) { return (SetCloudArmorTier) super.set$Xgafv($Xgafv); } @Override public SetCloudArmorTier setAccessToken(java.lang.String accessToken) { return (SetCloudArmorTier) super.setAccessToken(accessToken); } @Override public SetCloudArmorTier setAlt(java.lang.String alt) { return (SetCloudArmorTier) super.setAlt(alt); } @Override public SetCloudArmorTier setCallback(java.lang.String callback) { return (SetCloudArmorTier) super.setCallback(callback); } @Override public SetCloudArmorTier setFields(java.lang.String fields) { return (SetCloudArmorTier) super.setFields(fields); } @Override public SetCloudArmorTier setKey(java.lang.String key) { return (SetCloudArmorTier) super.setKey(key); } @Override public SetCloudArmorTier setOauthToken(java.lang.String oauthToken) { return (SetCloudArmorTier) super.setOauthToken(oauthToken); } @Override public SetCloudArmorTier setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetCloudArmorTier) super.setPrettyPrint(prettyPrint); } @Override public SetCloudArmorTier setQuotaUser(java.lang.String quotaUser) { return (SetCloudArmorTier) super.setQuotaUser(quotaUser); } @Override public SetCloudArmorTier setUploadType(java.lang.String uploadType) { return (SetCloudArmorTier) super.setUploadType(uploadType); } @Override public SetCloudArmorTier setUploadProtocol(java.lang.String uploadProtocol) { return (SetCloudArmorTier) super.setUploadProtocol(uploadProtocol); } @Override public SetCloudArmorTier setUserIp(java.lang.String userIp) { return (SetCloudArmorTier) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetCloudArmorTier setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetCloudArmorTier setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetCloudArmorTier set(String parameterName, Object value) { return (SetCloudArmorTier) super.set(parameterName, value); } } /** * Sets metadata common to all instances within the specified project using the data included in the * request. * * Create a request for the method "projects.setCommonInstanceMetadata". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetCommonInstanceMetadata#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Metadata} * @return the request */ public SetCommonInstanceMetadata setCommonInstanceMetadata(java.lang.String project, com.google.api.services.compute.model.Metadata content) throws java.io.IOException { SetCommonInstanceMetadata result = new SetCommonInstanceMetadata(project, content); initialize(result); return result; } public class SetCommonInstanceMetadata extends ComputeRequest { private static final String REST_PATH = "projects/{project}/setCommonInstanceMetadata"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Sets metadata common to all instances within the specified project using the data included in * the request. * * Create a request for the method "projects.setCommonInstanceMetadata". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetCommonInstanceMetadata#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Metadata} * @since 1.13 */ protected SetCommonInstanceMetadata(java.lang.String project, com.google.api.services.compute.model.Metadata content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public SetCommonInstanceMetadata set$Xgafv(java.lang.String $Xgafv) { return (SetCommonInstanceMetadata) super.set$Xgafv($Xgafv); } @Override public SetCommonInstanceMetadata setAccessToken(java.lang.String accessToken) { return (SetCommonInstanceMetadata) super.setAccessToken(accessToken); } @Override public SetCommonInstanceMetadata setAlt(java.lang.String alt) { return (SetCommonInstanceMetadata) super.setAlt(alt); } @Override public SetCommonInstanceMetadata setCallback(java.lang.String callback) { return (SetCommonInstanceMetadata) super.setCallback(callback); } @Override public SetCommonInstanceMetadata setFields(java.lang.String fields) { return (SetCommonInstanceMetadata) super.setFields(fields); } @Override public SetCommonInstanceMetadata setKey(java.lang.String key) { return (SetCommonInstanceMetadata) super.setKey(key); } @Override public SetCommonInstanceMetadata setOauthToken(java.lang.String oauthToken) { return (SetCommonInstanceMetadata) super.setOauthToken(oauthToken); } @Override public SetCommonInstanceMetadata setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetCommonInstanceMetadata) super.setPrettyPrint(prettyPrint); } @Override public SetCommonInstanceMetadata setQuotaUser(java.lang.String quotaUser) { return (SetCommonInstanceMetadata) super.setQuotaUser(quotaUser); } @Override public SetCommonInstanceMetadata setUploadType(java.lang.String uploadType) { return (SetCommonInstanceMetadata) super.setUploadType(uploadType); } @Override public SetCommonInstanceMetadata setUploadProtocol(java.lang.String uploadProtocol) { return (SetCommonInstanceMetadata) super.setUploadProtocol(uploadProtocol); } @Override public SetCommonInstanceMetadata setUserIp(java.lang.String userIp) { return (SetCommonInstanceMetadata) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetCommonInstanceMetadata setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetCommonInstanceMetadata setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetCommonInstanceMetadata set(String parameterName, Object value) { return (SetCommonInstanceMetadata) super.set(parameterName, value); } } /** * Sets the default network tier of the project. The default network tier is used when an * address/forwardingRule/instance is created without specifying the network tier field. * * Create a request for the method "projects.setDefaultNetworkTier". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetDefaultNetworkTier#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.ProjectsSetDefaultNetworkTierRequest} * @return the request */ public SetDefaultNetworkTier setDefaultNetworkTier(java.lang.String project, com.google.api.services.compute.model.ProjectsSetDefaultNetworkTierRequest content) throws java.io.IOException { SetDefaultNetworkTier result = new SetDefaultNetworkTier(project, content); initialize(result); return result; } public class SetDefaultNetworkTier extends ComputeRequest { private static final String REST_PATH = "projects/{project}/setDefaultNetworkTier"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Sets the default network tier of the project. The default network tier is used when an * address/forwardingRule/instance is created without specifying the network tier field. * * Create a request for the method "projects.setDefaultNetworkTier". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetDefaultNetworkTier#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.ProjectsSetDefaultNetworkTierRequest} * @since 1.13 */ protected SetDefaultNetworkTier(java.lang.String project, com.google.api.services.compute.model.ProjectsSetDefaultNetworkTierRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public SetDefaultNetworkTier set$Xgafv(java.lang.String $Xgafv) { return (SetDefaultNetworkTier) super.set$Xgafv($Xgafv); } @Override public SetDefaultNetworkTier setAccessToken(java.lang.String accessToken) { return (SetDefaultNetworkTier) super.setAccessToken(accessToken); } @Override public SetDefaultNetworkTier setAlt(java.lang.String alt) { return (SetDefaultNetworkTier) super.setAlt(alt); } @Override public SetDefaultNetworkTier setCallback(java.lang.String callback) { return (SetDefaultNetworkTier) super.setCallback(callback); } @Override public SetDefaultNetworkTier setFields(java.lang.String fields) { return (SetDefaultNetworkTier) super.setFields(fields); } @Override public SetDefaultNetworkTier setKey(java.lang.String key) { return (SetDefaultNetworkTier) super.setKey(key); } @Override public SetDefaultNetworkTier setOauthToken(java.lang.String oauthToken) { return (SetDefaultNetworkTier) super.setOauthToken(oauthToken); } @Override public SetDefaultNetworkTier setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetDefaultNetworkTier) super.setPrettyPrint(prettyPrint); } @Override public SetDefaultNetworkTier setQuotaUser(java.lang.String quotaUser) { return (SetDefaultNetworkTier) super.setQuotaUser(quotaUser); } @Override public SetDefaultNetworkTier setUploadType(java.lang.String uploadType) { return (SetDefaultNetworkTier) super.setUploadType(uploadType); } @Override public SetDefaultNetworkTier setUploadProtocol(java.lang.String uploadProtocol) { return (SetDefaultNetworkTier) super.setUploadProtocol(uploadProtocol); } @Override public SetDefaultNetworkTier setUserIp(java.lang.String userIp) { return (SetDefaultNetworkTier) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetDefaultNetworkTier setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetDefaultNetworkTier setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetDefaultNetworkTier set(String parameterName, Object value) { return (SetDefaultNetworkTier) super.set(parameterName, value); } } /** * Enables the usage export feature and sets the usage export bucket where reports are stored. If * you provide an empty request body using this method, the usage export feature will be disabled. * * Create a request for the method "projects.setUsageExportBucket". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetUsageExportBucket#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.UsageExportLocation} * @return the request */ public SetUsageExportBucket setUsageExportBucket(java.lang.String project, com.google.api.services.compute.model.UsageExportLocation content) throws java.io.IOException { SetUsageExportBucket result = new SetUsageExportBucket(project, content); initialize(result); return result; } public class SetUsageExportBucket extends ComputeRequest { private static final String REST_PATH = "projects/{project}/setUsageExportBucket"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Enables the usage export feature and sets the usage export bucket where reports are stored. If * you provide an empty request body using this method, the usage export feature will be disabled. * * Create a request for the method "projects.setUsageExportBucket". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetUsageExportBucket#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.UsageExportLocation} * @since 1.13 */ protected SetUsageExportBucket(java.lang.String project, com.google.api.services.compute.model.UsageExportLocation content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public SetUsageExportBucket set$Xgafv(java.lang.String $Xgafv) { return (SetUsageExportBucket) super.set$Xgafv($Xgafv); } @Override public SetUsageExportBucket setAccessToken(java.lang.String accessToken) { return (SetUsageExportBucket) super.setAccessToken(accessToken); } @Override public SetUsageExportBucket setAlt(java.lang.String alt) { return (SetUsageExportBucket) super.setAlt(alt); } @Override public SetUsageExportBucket setCallback(java.lang.String callback) { return (SetUsageExportBucket) super.setCallback(callback); } @Override public SetUsageExportBucket setFields(java.lang.String fields) { return (SetUsageExportBucket) super.setFields(fields); } @Override public SetUsageExportBucket setKey(java.lang.String key) { return (SetUsageExportBucket) super.setKey(key); } @Override public SetUsageExportBucket setOauthToken(java.lang.String oauthToken) { return (SetUsageExportBucket) super.setOauthToken(oauthToken); } @Override public SetUsageExportBucket setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetUsageExportBucket) super.setPrettyPrint(prettyPrint); } @Override public SetUsageExportBucket setQuotaUser(java.lang.String quotaUser) { return (SetUsageExportBucket) super.setQuotaUser(quotaUser); } @Override public SetUsageExportBucket setUploadType(java.lang.String uploadType) { return (SetUsageExportBucket) super.setUploadType(uploadType); } @Override public SetUsageExportBucket setUploadProtocol(java.lang.String uploadProtocol) { return (SetUsageExportBucket) super.setUploadProtocol(uploadProtocol); } @Override public SetUsageExportBucket setUserIp(java.lang.String userIp) { return (SetUsageExportBucket) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetUsageExportBucket setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetUsageExportBucket setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetUsageExportBucket set(String parameterName, Object value) { return (SetUsageExportBucket) super.set(parameterName, value); } } } /** * An accessor for creating requests from the PublicAdvertisedPrefixes collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.PublicAdvertisedPrefixes.List request = compute.publicAdvertisedPrefixes().list(parameters ...)}
   * 
* * @return the resource collection */ public PublicAdvertisedPrefixes publicAdvertisedPrefixes() { return new PublicAdvertisedPrefixes(); } /** * The "publicAdvertisedPrefixes" collection of methods. */ public class PublicAdvertisedPrefixes { /** * Announces the specified PublicAdvertisedPrefix * * Create a request for the method "publicAdvertisedPrefixes.announce". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Announce#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param publicAdvertisedPrefix The name of the public advertised prefix. It should comply with RFC1035. * @return the request */ public Announce announce(java.lang.String project, java.lang.String publicAdvertisedPrefix) throws java.io.IOException { Announce result = new Announce(project, publicAdvertisedPrefix); initialize(result); return result; } public class Announce extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/announce"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Announces the specified PublicAdvertisedPrefix * * Create a request for the method "publicAdvertisedPrefixes.announce". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Announce#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param publicAdvertisedPrefix The name of the public advertised prefix. It should comply with RFC1035. * @since 1.13 */ protected Announce(java.lang.String project, java.lang.String publicAdvertisedPrefix) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.publicAdvertisedPrefix = com.google.api.client.util.Preconditions.checkNotNull(publicAdvertisedPrefix, "Required parameter publicAdvertisedPrefix must be specified."); } @Override public Announce set$Xgafv(java.lang.String $Xgafv) { return (Announce) super.set$Xgafv($Xgafv); } @Override public Announce setAccessToken(java.lang.String accessToken) { return (Announce) super.setAccessToken(accessToken); } @Override public Announce setAlt(java.lang.String alt) { return (Announce) super.setAlt(alt); } @Override public Announce setCallback(java.lang.String callback) { return (Announce) super.setCallback(callback); } @Override public Announce setFields(java.lang.String fields) { return (Announce) super.setFields(fields); } @Override public Announce setKey(java.lang.String key) { return (Announce) super.setKey(key); } @Override public Announce setOauthToken(java.lang.String oauthToken) { return (Announce) super.setOauthToken(oauthToken); } @Override public Announce setPrettyPrint(java.lang.Boolean prettyPrint) { return (Announce) super.setPrettyPrint(prettyPrint); } @Override public Announce setQuotaUser(java.lang.String quotaUser) { return (Announce) super.setQuotaUser(quotaUser); } @Override public Announce setUploadType(java.lang.String uploadType) { return (Announce) super.setUploadType(uploadType); } @Override public Announce setUploadProtocol(java.lang.String uploadProtocol) { return (Announce) super.setUploadProtocol(uploadProtocol); } @Override public Announce setUserIp(java.lang.String userIp) { return (Announce) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Announce setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the public advertised prefix. It should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String publicAdvertisedPrefix; /** The name of the public advertised prefix. It should comply with RFC1035. */ public java.lang.String getPublicAdvertisedPrefix() { return publicAdvertisedPrefix; } /** The name of the public advertised prefix. It should comply with RFC1035. */ public Announce setPublicAdvertisedPrefix(java.lang.String publicAdvertisedPrefix) { this.publicAdvertisedPrefix = publicAdvertisedPrefix; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Announce setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Announce set(String parameterName, Object value) { return (Announce) super.set(parameterName, value); } } /** * Deletes the specified PublicAdvertisedPrefix * * Create a request for the method "publicAdvertisedPrefixes.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param publicAdvertisedPrefix Name of the PublicAdvertisedPrefix resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String publicAdvertisedPrefix) throws java.io.IOException { Delete result = new Delete(project, publicAdvertisedPrefix); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern PUBLIC_ADVERTISED_PREFIX_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified PublicAdvertisedPrefix * * Create a request for the method "publicAdvertisedPrefixes.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param publicAdvertisedPrefix Name of the PublicAdvertisedPrefix resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String publicAdvertisedPrefix) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.publicAdvertisedPrefix = com.google.api.client.util.Preconditions.checkNotNull(publicAdvertisedPrefix, "Required parameter publicAdvertisedPrefix must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_ADVERTISED_PREFIX_PATTERN.matcher(publicAdvertisedPrefix).matches(), "Parameter publicAdvertisedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the PublicAdvertisedPrefix resource to delete. */ @com.google.api.client.util.Key private java.lang.String publicAdvertisedPrefix; /** Name of the PublicAdvertisedPrefix resource to delete. */ public java.lang.String getPublicAdvertisedPrefix() { return publicAdvertisedPrefix; } /** Name of the PublicAdvertisedPrefix resource to delete. */ public Delete setPublicAdvertisedPrefix(java.lang.String publicAdvertisedPrefix) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_ADVERTISED_PREFIX_PATTERN.matcher(publicAdvertisedPrefix).matches(), "Parameter publicAdvertisedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.publicAdvertisedPrefix = publicAdvertisedPrefix; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified PublicAdvertisedPrefix resource. * * Create a request for the method "publicAdvertisedPrefixes.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param publicAdvertisedPrefix Name of the PublicAdvertisedPrefix resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String publicAdvertisedPrefix) throws java.io.IOException { Get result = new Get(project, publicAdvertisedPrefix); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern PUBLIC_ADVERTISED_PREFIX_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified PublicAdvertisedPrefix resource. * * Create a request for the method "publicAdvertisedPrefixes.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param publicAdvertisedPrefix Name of the PublicAdvertisedPrefix resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String publicAdvertisedPrefix) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.PublicAdvertisedPrefix.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.publicAdvertisedPrefix = com.google.api.client.util.Preconditions.checkNotNull(publicAdvertisedPrefix, "Required parameter publicAdvertisedPrefix must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_ADVERTISED_PREFIX_PATTERN.matcher(publicAdvertisedPrefix).matches(), "Parameter publicAdvertisedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the PublicAdvertisedPrefix resource to return. */ @com.google.api.client.util.Key private java.lang.String publicAdvertisedPrefix; /** Name of the PublicAdvertisedPrefix resource to return. */ public java.lang.String getPublicAdvertisedPrefix() { return publicAdvertisedPrefix; } /** Name of the PublicAdvertisedPrefix resource to return. */ public Get setPublicAdvertisedPrefix(java.lang.String publicAdvertisedPrefix) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_ADVERTISED_PREFIX_PATTERN.matcher(publicAdvertisedPrefix).matches(), "Parameter publicAdvertisedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.publicAdvertisedPrefix = publicAdvertisedPrefix; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a PublicAdvertisedPrefix in the specified project using the parameters that are included * in the request. * * Create a request for the method "publicAdvertisedPrefixes.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.PublicAdvertisedPrefix} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.PublicAdvertisedPrefix content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/publicAdvertisedPrefixes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a PublicAdvertisedPrefix in the specified project using the parameters that are * included in the request. * * Create a request for the method "publicAdvertisedPrefixes.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.PublicAdvertisedPrefix} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.PublicAdvertisedPrefix content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists the PublicAdvertisedPrefixes for a project. * * Create a request for the method "publicAdvertisedPrefixes.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/publicAdvertisedPrefixes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists the PublicAdvertisedPrefixes for a project. * * Create a request for the method "publicAdvertisedPrefixes.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.PublicAdvertisedPrefixList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified Router resource with the data included in the request. This method supports * PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "publicAdvertisedPrefixes.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param publicAdvertisedPrefix Name of the PublicAdvertisedPrefix resource to patch. * @param content the {@link com.google.api.services.compute.model.PublicAdvertisedPrefix} * @return the request */ public Patch patch(java.lang.String project, java.lang.String publicAdvertisedPrefix, com.google.api.services.compute.model.PublicAdvertisedPrefix content) throws java.io.IOException { Patch result = new Patch(project, publicAdvertisedPrefix, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern PUBLIC_ADVERTISED_PREFIX_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified Router resource with the data included in the request. This method * supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "publicAdvertisedPrefixes.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param publicAdvertisedPrefix Name of the PublicAdvertisedPrefix resource to patch. * @param content the {@link com.google.api.services.compute.model.PublicAdvertisedPrefix} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String publicAdvertisedPrefix, com.google.api.services.compute.model.PublicAdvertisedPrefix content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.publicAdvertisedPrefix = com.google.api.client.util.Preconditions.checkNotNull(publicAdvertisedPrefix, "Required parameter publicAdvertisedPrefix must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_ADVERTISED_PREFIX_PATTERN.matcher(publicAdvertisedPrefix).matches(), "Parameter publicAdvertisedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the PublicAdvertisedPrefix resource to patch. */ @com.google.api.client.util.Key private java.lang.String publicAdvertisedPrefix; /** Name of the PublicAdvertisedPrefix resource to patch. */ public java.lang.String getPublicAdvertisedPrefix() { return publicAdvertisedPrefix; } /** Name of the PublicAdvertisedPrefix resource to patch. */ public Patch setPublicAdvertisedPrefix(java.lang.String publicAdvertisedPrefix) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_ADVERTISED_PREFIX_PATTERN.matcher(publicAdvertisedPrefix).matches(), "Parameter publicAdvertisedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.publicAdvertisedPrefix = publicAdvertisedPrefix; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Withdraws the specified PublicAdvertisedPrefix * * Create a request for the method "publicAdvertisedPrefixes.withdraw". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Withdraw#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param publicAdvertisedPrefix The name of the public advertised prefix. It should comply with RFC1035. * @return the request */ public Withdraw withdraw(java.lang.String project, java.lang.String publicAdvertisedPrefix) throws java.io.IOException { Withdraw result = new Withdraw(project, publicAdvertisedPrefix); initialize(result); return result; } public class Withdraw extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Withdraws the specified PublicAdvertisedPrefix * * Create a request for the method "publicAdvertisedPrefixes.withdraw". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Withdraw#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param publicAdvertisedPrefix The name of the public advertised prefix. It should comply with RFC1035. * @since 1.13 */ protected Withdraw(java.lang.String project, java.lang.String publicAdvertisedPrefix) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.publicAdvertisedPrefix = com.google.api.client.util.Preconditions.checkNotNull(publicAdvertisedPrefix, "Required parameter publicAdvertisedPrefix must be specified."); } @Override public Withdraw set$Xgafv(java.lang.String $Xgafv) { return (Withdraw) super.set$Xgafv($Xgafv); } @Override public Withdraw setAccessToken(java.lang.String accessToken) { return (Withdraw) super.setAccessToken(accessToken); } @Override public Withdraw setAlt(java.lang.String alt) { return (Withdraw) super.setAlt(alt); } @Override public Withdraw setCallback(java.lang.String callback) { return (Withdraw) super.setCallback(callback); } @Override public Withdraw setFields(java.lang.String fields) { return (Withdraw) super.setFields(fields); } @Override public Withdraw setKey(java.lang.String key) { return (Withdraw) super.setKey(key); } @Override public Withdraw setOauthToken(java.lang.String oauthToken) { return (Withdraw) super.setOauthToken(oauthToken); } @Override public Withdraw setPrettyPrint(java.lang.Boolean prettyPrint) { return (Withdraw) super.setPrettyPrint(prettyPrint); } @Override public Withdraw setQuotaUser(java.lang.String quotaUser) { return (Withdraw) super.setQuotaUser(quotaUser); } @Override public Withdraw setUploadType(java.lang.String uploadType) { return (Withdraw) super.setUploadType(uploadType); } @Override public Withdraw setUploadProtocol(java.lang.String uploadProtocol) { return (Withdraw) super.setUploadProtocol(uploadProtocol); } @Override public Withdraw setUserIp(java.lang.String userIp) { return (Withdraw) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Withdraw setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the public advertised prefix. It should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String publicAdvertisedPrefix; /** The name of the public advertised prefix. It should comply with RFC1035. */ public java.lang.String getPublicAdvertisedPrefix() { return publicAdvertisedPrefix; } /** The name of the public advertised prefix. It should comply with RFC1035. */ public Withdraw setPublicAdvertisedPrefix(java.lang.String publicAdvertisedPrefix) { this.publicAdvertisedPrefix = publicAdvertisedPrefix; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Withdraw setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Withdraw set(String parameterName, Object value) { return (Withdraw) super.set(parameterName, value); } } } /** * An accessor for creating requests from the PublicDelegatedPrefixes collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.PublicDelegatedPrefixes.List request = compute.publicDelegatedPrefixes().list(parameters ...)}
   * 
* * @return the resource collection */ public PublicDelegatedPrefixes publicDelegatedPrefixes() { return new PublicDelegatedPrefixes(); } /** * The "publicDelegatedPrefixes" collection of methods. */ public class PublicDelegatedPrefixes { /** * Lists all PublicDelegatedPrefix resources owned by the specific project across all scopes. To * prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "publicDelegatedPrefixes.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Name of the project scoping this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/publicDelegatedPrefixes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists all PublicDelegatedPrefix resources owned by the specific project across all scopes. To * prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "publicDelegatedPrefixes.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Name of the project scoping this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.PublicDelegatedPrefixAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Name of the project scoping this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Name of the project scoping this request. */ public java.lang.String getProject() { return project; } /** Name of the project scoping this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Announces the specified PublicDelegatedPrefix in the given region. * * Create a request for the method "publicDelegatedPrefixes.announce". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Announce#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region where the public delegated prefix is located. It should comply with RFC1035. * @param publicDelegatedPrefix The name of the public delegated prefix. It should comply with RFC1035. * @return the request */ public Announce announce(java.lang.String project, java.lang.String region, java.lang.String publicDelegatedPrefix) throws java.io.IOException { Announce result = new Announce(project, region, publicDelegatedPrefix); initialize(result); return result; } public class Announce extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Announces the specified PublicDelegatedPrefix in the given region. * * Create a request for the method "publicDelegatedPrefixes.announce". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Announce#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region where the public delegated prefix is located. It should comply with RFC1035. * @param publicDelegatedPrefix The name of the public delegated prefix. It should comply with RFC1035. * @since 1.13 */ protected Announce(java.lang.String project, java.lang.String region, java.lang.String publicDelegatedPrefix) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.publicDelegatedPrefix = com.google.api.client.util.Preconditions.checkNotNull(publicDelegatedPrefix, "Required parameter publicDelegatedPrefix must be specified."); } @Override public Announce set$Xgafv(java.lang.String $Xgafv) { return (Announce) super.set$Xgafv($Xgafv); } @Override public Announce setAccessToken(java.lang.String accessToken) { return (Announce) super.setAccessToken(accessToken); } @Override public Announce setAlt(java.lang.String alt) { return (Announce) super.setAlt(alt); } @Override public Announce setCallback(java.lang.String callback) { return (Announce) super.setCallback(callback); } @Override public Announce setFields(java.lang.String fields) { return (Announce) super.setFields(fields); } @Override public Announce setKey(java.lang.String key) { return (Announce) super.setKey(key); } @Override public Announce setOauthToken(java.lang.String oauthToken) { return (Announce) super.setOauthToken(oauthToken); } @Override public Announce setPrettyPrint(java.lang.Boolean prettyPrint) { return (Announce) super.setPrettyPrint(prettyPrint); } @Override public Announce setQuotaUser(java.lang.String quotaUser) { return (Announce) super.setQuotaUser(quotaUser); } @Override public Announce setUploadType(java.lang.String uploadType) { return (Announce) super.setUploadType(uploadType); } @Override public Announce setUploadProtocol(java.lang.String uploadProtocol) { return (Announce) super.setUploadProtocol(uploadProtocol); } @Override public Announce setUserIp(java.lang.String userIp) { return (Announce) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Announce setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the region where the public delegated prefix is located. It should comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region where the public delegated prefix is located. It should comply with RFC1035. */ public java.lang.String getRegion() { return region; } /** * The name of the region where the public delegated prefix is located. It should comply with * RFC1035. */ public Announce setRegion(java.lang.String region) { this.region = region; return this; } /** The name of the public delegated prefix. It should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String publicDelegatedPrefix; /** The name of the public delegated prefix. It should comply with RFC1035. */ public java.lang.String getPublicDelegatedPrefix() { return publicDelegatedPrefix; } /** The name of the public delegated prefix. It should comply with RFC1035. */ public Announce setPublicDelegatedPrefix(java.lang.String publicDelegatedPrefix) { this.publicDelegatedPrefix = publicDelegatedPrefix; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Announce setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Announce set(String parameterName, Object value) { return (Announce) super.set(parameterName, value); } } /** * Deletes the specified PublicDelegatedPrefix in the given region. * * Create a request for the method "publicDelegatedPrefixes.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region of this request. * @param publicDelegatedPrefix Name of the PublicDelegatedPrefix resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String publicDelegatedPrefix) throws java.io.IOException { Delete result = new Delete(project, region, publicDelegatedPrefix); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern PUBLIC_DELEGATED_PREFIX_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified PublicDelegatedPrefix in the given region. * * Create a request for the method "publicDelegatedPrefixes.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region of this request. * @param publicDelegatedPrefix Name of the PublicDelegatedPrefix resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String publicDelegatedPrefix) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.publicDelegatedPrefix = com.google.api.client.util.Preconditions.checkNotNull(publicDelegatedPrefix, "Required parameter publicDelegatedPrefix must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_DELEGATED_PREFIX_PATTERN.matcher(publicDelegatedPrefix).matches(), "Parameter publicDelegatedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region of this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region of this request. */ public java.lang.String getRegion() { return region; } /** Name of the region of this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the PublicDelegatedPrefix resource to delete. */ @com.google.api.client.util.Key private java.lang.String publicDelegatedPrefix; /** Name of the PublicDelegatedPrefix resource to delete. */ public java.lang.String getPublicDelegatedPrefix() { return publicDelegatedPrefix; } /** Name of the PublicDelegatedPrefix resource to delete. */ public Delete setPublicDelegatedPrefix(java.lang.String publicDelegatedPrefix) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_DELEGATED_PREFIX_PATTERN.matcher(publicDelegatedPrefix).matches(), "Parameter publicDelegatedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.publicDelegatedPrefix = publicDelegatedPrefix; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified PublicDelegatedPrefix resource in the given region. * * Create a request for the method "publicDelegatedPrefixes.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region of this request. * @param publicDelegatedPrefix Name of the PublicDelegatedPrefix resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String publicDelegatedPrefix) throws java.io.IOException { Get result = new Get(project, region, publicDelegatedPrefix); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern PUBLIC_DELEGATED_PREFIX_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified PublicDelegatedPrefix resource in the given region. * * Create a request for the method "publicDelegatedPrefixes.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region of this request. * @param publicDelegatedPrefix Name of the PublicDelegatedPrefix resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String publicDelegatedPrefix) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.PublicDelegatedPrefix.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.publicDelegatedPrefix = com.google.api.client.util.Preconditions.checkNotNull(publicDelegatedPrefix, "Required parameter publicDelegatedPrefix must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_DELEGATED_PREFIX_PATTERN.matcher(publicDelegatedPrefix).matches(), "Parameter publicDelegatedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region of this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region of this request. */ public java.lang.String getRegion() { return region; } /** Name of the region of this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the PublicDelegatedPrefix resource to return. */ @com.google.api.client.util.Key private java.lang.String publicDelegatedPrefix; /** Name of the PublicDelegatedPrefix resource to return. */ public java.lang.String getPublicDelegatedPrefix() { return publicDelegatedPrefix; } /** Name of the PublicDelegatedPrefix resource to return. */ public Get setPublicDelegatedPrefix(java.lang.String publicDelegatedPrefix) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_DELEGATED_PREFIX_PATTERN.matcher(publicDelegatedPrefix).matches(), "Parameter publicDelegatedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.publicDelegatedPrefix = publicDelegatedPrefix; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a PublicDelegatedPrefix in the specified project in the given region using the parameters * that are included in the request. * * Create a request for the method "publicDelegatedPrefixes.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region of this request. * @param content the {@link com.google.api.services.compute.model.PublicDelegatedPrefix} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.PublicDelegatedPrefix content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/publicDelegatedPrefixes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a PublicDelegatedPrefix in the specified project in the given region using the * parameters that are included in the request. * * Create a request for the method "publicDelegatedPrefixes.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region of this request. * @param content the {@link com.google.api.services.compute.model.PublicDelegatedPrefix} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.PublicDelegatedPrefix content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region of this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region of this request. */ public java.lang.String getRegion() { return region; } /** Name of the region of this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists the PublicDelegatedPrefixes for a project in the given region. * * Create a request for the method "publicDelegatedPrefixes.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region of this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/publicDelegatedPrefixes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Lists the PublicDelegatedPrefixes for a project in the given region. * * Create a request for the method "publicDelegatedPrefixes.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region of this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.PublicDelegatedPrefixList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region of this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region of this request. */ public java.lang.String getRegion() { return region; } /** Name of the region of this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified PublicDelegatedPrefix resource with the data included in the request. This * method supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "publicDelegatedPrefixes.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param publicDelegatedPrefix Name of the PublicDelegatedPrefix resource to patch. * @param content the {@link com.google.api.services.compute.model.PublicDelegatedPrefix} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String publicDelegatedPrefix, com.google.api.services.compute.model.PublicDelegatedPrefix content) throws java.io.IOException { Patch result = new Patch(project, region, publicDelegatedPrefix, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern PUBLIC_DELEGATED_PREFIX_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified PublicDelegatedPrefix resource with the data included in the request. * This method supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "publicDelegatedPrefixes.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param publicDelegatedPrefix Name of the PublicDelegatedPrefix resource to patch. * @param content the {@link com.google.api.services.compute.model.PublicDelegatedPrefix} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String publicDelegatedPrefix, com.google.api.services.compute.model.PublicDelegatedPrefix content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.publicDelegatedPrefix = com.google.api.client.util.Preconditions.checkNotNull(publicDelegatedPrefix, "Required parameter publicDelegatedPrefix must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_DELEGATED_PREFIX_PATTERN.matcher(publicDelegatedPrefix).matches(), "Parameter publicDelegatedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the PublicDelegatedPrefix resource to patch. */ @com.google.api.client.util.Key private java.lang.String publicDelegatedPrefix; /** Name of the PublicDelegatedPrefix resource to patch. */ public java.lang.String getPublicDelegatedPrefix() { return publicDelegatedPrefix; } /** Name of the PublicDelegatedPrefix resource to patch. */ public Patch setPublicDelegatedPrefix(java.lang.String publicDelegatedPrefix) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PUBLIC_DELEGATED_PREFIX_PATTERN.matcher(publicDelegatedPrefix).matches(), "Parameter publicDelegatedPrefix must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.publicDelegatedPrefix = publicDelegatedPrefix; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Withdraws the specified PublicDelegatedPrefix in the given region. * * Create a request for the method "publicDelegatedPrefixes.withdraw". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Withdraw#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region where the public delegated prefix is located. It should comply with RFC1035. * @param publicDelegatedPrefix The name of the public delegated prefix. It should comply with RFC1035. * @return the request */ public Withdraw withdraw(java.lang.String project, java.lang.String region, java.lang.String publicDelegatedPrefix) throws java.io.IOException { Withdraw result = new Withdraw(project, region, publicDelegatedPrefix); initialize(result); return result; } public class Withdraw extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Withdraws the specified PublicDelegatedPrefix in the given region. * * Create a request for the method "publicDelegatedPrefixes.withdraw". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Withdraw#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region where the public delegated prefix is located. It should comply with RFC1035. * @param publicDelegatedPrefix The name of the public delegated prefix. It should comply with RFC1035. * @since 1.13 */ protected Withdraw(java.lang.String project, java.lang.String region, java.lang.String publicDelegatedPrefix) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.publicDelegatedPrefix = com.google.api.client.util.Preconditions.checkNotNull(publicDelegatedPrefix, "Required parameter publicDelegatedPrefix must be specified."); } @Override public Withdraw set$Xgafv(java.lang.String $Xgafv) { return (Withdraw) super.set$Xgafv($Xgafv); } @Override public Withdraw setAccessToken(java.lang.String accessToken) { return (Withdraw) super.setAccessToken(accessToken); } @Override public Withdraw setAlt(java.lang.String alt) { return (Withdraw) super.setAlt(alt); } @Override public Withdraw setCallback(java.lang.String callback) { return (Withdraw) super.setCallback(callback); } @Override public Withdraw setFields(java.lang.String fields) { return (Withdraw) super.setFields(fields); } @Override public Withdraw setKey(java.lang.String key) { return (Withdraw) super.setKey(key); } @Override public Withdraw setOauthToken(java.lang.String oauthToken) { return (Withdraw) super.setOauthToken(oauthToken); } @Override public Withdraw setPrettyPrint(java.lang.Boolean prettyPrint) { return (Withdraw) super.setPrettyPrint(prettyPrint); } @Override public Withdraw setQuotaUser(java.lang.String quotaUser) { return (Withdraw) super.setQuotaUser(quotaUser); } @Override public Withdraw setUploadType(java.lang.String uploadType) { return (Withdraw) super.setUploadType(uploadType); } @Override public Withdraw setUploadProtocol(java.lang.String uploadProtocol) { return (Withdraw) super.setUploadProtocol(uploadProtocol); } @Override public Withdraw setUserIp(java.lang.String userIp) { return (Withdraw) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Withdraw setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the region where the public delegated prefix is located. It should comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region where the public delegated prefix is located. It should comply with RFC1035. */ public java.lang.String getRegion() { return region; } /** * The name of the region where the public delegated prefix is located. It should comply with * RFC1035. */ public Withdraw setRegion(java.lang.String region) { this.region = region; return this; } /** The name of the public delegated prefix. It should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String publicDelegatedPrefix; /** The name of the public delegated prefix. It should comply with RFC1035. */ public java.lang.String getPublicDelegatedPrefix() { return publicDelegatedPrefix; } /** The name of the public delegated prefix. It should comply with RFC1035. */ public Withdraw setPublicDelegatedPrefix(java.lang.String publicDelegatedPrefix) { this.publicDelegatedPrefix = publicDelegatedPrefix; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Withdraw setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Withdraw set(String parameterName, Object value) { return (Withdraw) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionAutoscalers collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionAutoscalers.List request = compute.regionAutoscalers().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionAutoscalers regionAutoscalers() { return new RegionAutoscalers(); } /** * The "regionAutoscalers" collection of methods. */ public class RegionAutoscalers { /** * Deletes the specified autoscaler. * * Create a request for the method "regionAutoscalers.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param autoscaler Name of the autoscaler to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String autoscaler) throws java.io.IOException { Delete result = new Delete(project, region, autoscaler); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/autoscalers/{autoscaler}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern AUTOSCALER_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified autoscaler. * * Create a request for the method "regionAutoscalers.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param autoscaler Name of the autoscaler to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String autoscaler) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.autoscaler = com.google.api.client.util.Preconditions.checkNotNull(autoscaler, "Required parameter autoscaler must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(AUTOSCALER_PATTERN.matcher(autoscaler).matches(), "Parameter autoscaler must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the autoscaler to delete. */ @com.google.api.client.util.Key private java.lang.String autoscaler; /** Name of the autoscaler to delete. */ public java.lang.String getAutoscaler() { return autoscaler; } /** Name of the autoscaler to delete. */ public Delete setAutoscaler(java.lang.String autoscaler) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(AUTOSCALER_PATTERN.matcher(autoscaler).matches(), "Parameter autoscaler must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.autoscaler = autoscaler; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified autoscaler. * * Create a request for the method "regionAutoscalers.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param autoscaler Name of the autoscaler to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String autoscaler) throws java.io.IOException { Get result = new Get(project, region, autoscaler); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/autoscalers/{autoscaler}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern AUTOSCALER_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified autoscaler. * * Create a request for the method "regionAutoscalers.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param autoscaler Name of the autoscaler to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String autoscaler) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Autoscaler.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.autoscaler = com.google.api.client.util.Preconditions.checkNotNull(autoscaler, "Required parameter autoscaler must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(AUTOSCALER_PATTERN.matcher(autoscaler).matches(), "Parameter autoscaler must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the autoscaler to return. */ @com.google.api.client.util.Key private java.lang.String autoscaler; /** Name of the autoscaler to return. */ public java.lang.String getAutoscaler() { return autoscaler; } /** Name of the autoscaler to return. */ public Get setAutoscaler(java.lang.String autoscaler) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(AUTOSCALER_PATTERN.matcher(autoscaler).matches(), "Parameter autoscaler must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.autoscaler = autoscaler; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates an autoscaler in the specified project using the data included in the request. * * Create a request for the method "regionAutoscalers.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.Autoscaler} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Autoscaler content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/autoscalers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates an autoscaler in the specified project using the data included in the request. * * Create a request for the method "regionAutoscalers.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.Autoscaler} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Autoscaler content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of autoscalers contained within the specified region. * * Create a request for the method "regionAutoscalers.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/autoscalers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of autoscalers contained within the specified region. * * Create a request for the method "regionAutoscalers.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.RegionAutoscalerList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates an autoscaler in the specified project using the data included in the request. This * method supports PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "regionAutoscalers.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.Autoscaler} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Autoscaler content) throws java.io.IOException { Patch result = new Patch(project, region, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/autoscalers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern AUTOSCALER_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates an autoscaler in the specified project using the data included in the request. This * method supports PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "regionAutoscalers.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.Autoscaler} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Autoscaler content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the autoscaler to patch. */ @com.google.api.client.util.Key private java.lang.String autoscaler; /** Name of the autoscaler to patch. */ public java.lang.String getAutoscaler() { return autoscaler; } /** Name of the autoscaler to patch. */ public Patch setAutoscaler(java.lang.String autoscaler) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(AUTOSCALER_PATTERN.matcher(autoscaler).matches(), "Parameter autoscaler must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.autoscaler = autoscaler; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates an autoscaler in the specified project using the data included in the request. * * Create a request for the method "regionAutoscalers.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.Autoscaler} * @return the request */ public Update update(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Autoscaler content) throws java.io.IOException { Update result = new Update(project, region, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/autoscalers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern AUTOSCALER_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates an autoscaler in the specified project using the data included in the request. * * Create a request for the method "regionAutoscalers.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.Autoscaler} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Autoscaler content) { super(Compute.this, "PUT", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Update setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the autoscaler to update. */ @com.google.api.client.util.Key private java.lang.String autoscaler; /** Name of the autoscaler to update. */ public java.lang.String getAutoscaler() { return autoscaler; } /** Name of the autoscaler to update. */ public Update setAutoscaler(java.lang.String autoscaler) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(AUTOSCALER_PATTERN.matcher(autoscaler).matches(), "Parameter autoscaler must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.autoscaler = autoscaler; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionBackendServices collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionBackendServices.List request = compute.regionBackendServices().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionBackendServices regionBackendServices() { return new RegionBackendServices(); } /** * The "regionBackendServices" collection of methods. */ public class RegionBackendServices { /** * Deletes the specified regional BackendService resource. * * Create a request for the method "regionBackendServices.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param backendService Name of the BackendService resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String backendService) throws java.io.IOException { Delete result = new Delete(project, region, backendService); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/backendServices/{backendService}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern BACKEND_SERVICE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified regional BackendService resource. * * Create a request for the method "regionBackendServices.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param backendService Name of the BackendService resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String backendService) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.backendService = com.google.api.client.util.Preconditions.checkNotNull(backendService, "Required parameter backendService must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the BackendService resource to delete. */ @com.google.api.client.util.Key private java.lang.String backendService; /** Name of the BackendService resource to delete. */ public java.lang.String getBackendService() { return backendService; } /** Name of the BackendService resource to delete. */ public Delete setBackendService(java.lang.String backendService) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.backendService = backendService; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified regional BackendService resource. * * Create a request for the method "regionBackendServices.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param backendService Name of the BackendService resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String backendService) throws java.io.IOException { Get result = new Get(project, region, backendService); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/backendServices/{backendService}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern BACKEND_SERVICE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified regional BackendService resource. * * Create a request for the method "regionBackendServices.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param backendService Name of the BackendService resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String backendService) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.BackendService.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.backendService = com.google.api.client.util.Preconditions.checkNotNull(backendService, "Required parameter backendService must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the BackendService resource to return. */ @com.google.api.client.util.Key private java.lang.String backendService; /** Name of the BackendService resource to return. */ public java.lang.String getBackendService() { return backendService; } /** Name of the BackendService resource to return. */ public Get setBackendService(java.lang.String backendService) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.backendService = backendService; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the most recent health check results for this regional BackendService. * * Create a request for the method "regionBackendServices.getHealth". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetHealth#execute()} method to invoke the remote operation. * * @param project * @param region Name of the region scoping this request. * @param backendService Name of the BackendService resource for which to get health. * @param content the {@link com.google.api.services.compute.model.ResourceGroupReference} * @return the request */ public GetHealth getHealth(java.lang.String project, java.lang.String region, java.lang.String backendService, com.google.api.services.compute.model.ResourceGroupReference content) throws java.io.IOException { GetHealth result = new GetHealth(project, region, backendService, content); initialize(result); return result; } public class GetHealth extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/backendServices/{backendService}/getHealth"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern BACKEND_SERVICE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the most recent health check results for this regional BackendService. * * Create a request for the method "regionBackendServices.getHealth". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetHealth#execute()} method to invoke the remote operation.

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

* * @param project * @param region Name of the region scoping this request. * @param backendService Name of the BackendService resource for which to get health. * @param content the {@link com.google.api.services.compute.model.ResourceGroupReference} * @since 1.13 */ protected GetHealth(java.lang.String project, java.lang.String region, java.lang.String backendService, com.google.api.services.compute.model.ResourceGroupReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.BackendServiceGroupHealth.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.backendService = com.google.api.client.util.Preconditions.checkNotNull(backendService, "Required parameter backendService must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public GetHealth set$Xgafv(java.lang.String $Xgafv) { return (GetHealth) super.set$Xgafv($Xgafv); } @Override public GetHealth setAccessToken(java.lang.String accessToken) { return (GetHealth) super.setAccessToken(accessToken); } @Override public GetHealth setAlt(java.lang.String alt) { return (GetHealth) super.setAlt(alt); } @Override public GetHealth setCallback(java.lang.String callback) { return (GetHealth) super.setCallback(callback); } @Override public GetHealth setFields(java.lang.String fields) { return (GetHealth) super.setFields(fields); } @Override public GetHealth setKey(java.lang.String key) { return (GetHealth) super.setKey(key); } @Override public GetHealth setOauthToken(java.lang.String oauthToken) { return (GetHealth) super.setOauthToken(oauthToken); } @Override public GetHealth setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetHealth) super.setPrettyPrint(prettyPrint); } @Override public GetHealth setQuotaUser(java.lang.String quotaUser) { return (GetHealth) super.setQuotaUser(quotaUser); } @Override public GetHealth setUploadType(java.lang.String uploadType) { return (GetHealth) super.setUploadType(uploadType); } @Override public GetHealth setUploadProtocol(java.lang.String uploadProtocol) { return (GetHealth) super.setUploadProtocol(uploadProtocol); } @Override public GetHealth setUserIp(java.lang.String userIp) { return (GetHealth) super.setUserIp(userIp); } @com.google.api.client.util.Key private java.lang.String project; /** */ public java.lang.String getProject() { return project; } public GetHealth setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public GetHealth setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the BackendService resource for which to get health. */ @com.google.api.client.util.Key private java.lang.String backendService; /** Name of the BackendService resource for which to get health. */ public java.lang.String getBackendService() { return backendService; } /** Name of the BackendService resource for which to get health. */ public GetHealth setBackendService(java.lang.String backendService) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.backendService = backendService; return this; } @Override public GetHealth set(String parameterName, Object value) { return (GetHealth) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "regionBackendServices.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, region, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/backendServices/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "regionBackendServices.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public GetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a regional BackendService resource in the specified project using the data included in * the request. For more information, see Backend services overview. * * Create a request for the method "regionBackendServices.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.BackendService} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.BackendService content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/backendServices"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a regional BackendService resource in the specified project using the data included in * the request. For more information, see Backend services overview. * * Create a request for the method "regionBackendServices.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.BackendService} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.BackendService content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of regional BackendService resources available to the specified project in the * given region. * * Create a request for the method "regionBackendServices.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/backendServices"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves the list of regional BackendService resources available to the specified project in * the given region. * * Create a request for the method "regionBackendServices.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.BackendServiceList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Retrieves a list of all usable backend services in the specified project in the given region. * * Create a request for the method "regionBackendServices.listUsable". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListUsable#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. It must be a string that meets the requirements in RFC1035. * @return the request */ public ListUsable listUsable(java.lang.String project, java.lang.String region) throws java.io.IOException { ListUsable result = new ListUsable(project, region); initialize(result); return result; } public class ListUsable extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/backendServices/listUsable"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves a list of all usable backend services in the specified project in the given region. * * Create a request for the method "regionBackendServices.listUsable". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListUsable#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. It must be a string that meets the requirements in RFC1035. * @since 1.13 */ protected ListUsable(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.BackendServiceListUsable.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); } @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 ListUsable set$Xgafv(java.lang.String $Xgafv) { return (ListUsable) super.set$Xgafv($Xgafv); } @Override public ListUsable setAccessToken(java.lang.String accessToken) { return (ListUsable) super.setAccessToken(accessToken); } @Override public ListUsable setAlt(java.lang.String alt) { return (ListUsable) super.setAlt(alt); } @Override public ListUsable setCallback(java.lang.String callback) { return (ListUsable) super.setCallback(callback); } @Override public ListUsable setFields(java.lang.String fields) { return (ListUsable) super.setFields(fields); } @Override public ListUsable setKey(java.lang.String key) { return (ListUsable) super.setKey(key); } @Override public ListUsable setOauthToken(java.lang.String oauthToken) { return (ListUsable) super.setOauthToken(oauthToken); } @Override public ListUsable setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListUsable) super.setPrettyPrint(prettyPrint); } @Override public ListUsable setQuotaUser(java.lang.String quotaUser) { return (ListUsable) super.setQuotaUser(quotaUser); } @Override public ListUsable setUploadType(java.lang.String uploadType) { return (ListUsable) super.setUploadType(uploadType); } @Override public ListUsable setUploadProtocol(java.lang.String uploadProtocol) { return (ListUsable) super.setUploadProtocol(uploadProtocol); } @Override public ListUsable setUserIp(java.lang.String userIp) { return (ListUsable) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListUsable setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the region scoping this request. It must be a string that meets the requirements in * RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. It must be a string that meets the requirements in RFC1035. */ public java.lang.String getRegion() { return region; } /** * Name of the region scoping this request. It must be a string that meets the requirements in * RFC1035. */ public ListUsable setRegion(java.lang.String region) { this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListUsable setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListUsable setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListUsable setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListUsable setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListUsable setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListUsable set(String parameterName, Object value) { return (ListUsable) super.set(parameterName, value); } } /** * Updates the specified regional BackendService resource with the data included in the request. For * more information, see Understanding backend services This method supports PATCH semantics and * uses the JSON merge patch format and processing rules. * * Create a request for the method "regionBackendServices.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param backendService Name of the BackendService resource to patch. * @param content the {@link com.google.api.services.compute.model.BackendService} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String backendService, com.google.api.services.compute.model.BackendService content) throws java.io.IOException { Patch result = new Patch(project, region, backendService, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/backendServices/{backendService}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern BACKEND_SERVICE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified regional BackendService resource with the data included in the request. * For more information, see Understanding backend services This method supports PATCH semantics * and uses the JSON merge patch format and processing rules. * * Create a request for the method "regionBackendServices.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param backendService Name of the BackendService resource to patch. * @param content the {@link com.google.api.services.compute.model.BackendService} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String backendService, com.google.api.services.compute.model.BackendService content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.backendService = com.google.api.client.util.Preconditions.checkNotNull(backendService, "Required parameter backendService must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the BackendService resource to patch. */ @com.google.api.client.util.Key private java.lang.String backendService; /** Name of the BackendService resource to patch. */ public java.lang.String getBackendService() { return backendService; } /** Name of the BackendService resource to patch. */ public Patch setBackendService(java.lang.String backendService) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.backendService = backendService; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "regionBackendServices.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, region, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/backendServices/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "regionBackendServices.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public SetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Sets the Google Cloud Armor security policy for the specified backend service. For more * information, see Google Cloud Armor Overview * * Create a request for the method "regionBackendServices.setSecurityPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetSecurityPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param backendService Name of the BackendService resource to which the security policy should be set. The name should * conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyReference} * @return the request */ public SetSecurityPolicy setSecurityPolicy(java.lang.String project, java.lang.String region, java.lang.String backendService, com.google.api.services.compute.model.SecurityPolicyReference content) throws java.io.IOException { SetSecurityPolicy result = new SetSecurityPolicy(project, region, backendService, content); initialize(result); return result; } public class SetSecurityPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Sets the Google Cloud Armor security policy for the specified backend service. For more * information, see Google Cloud Armor Overview * * Create a request for the method "regionBackendServices.setSecurityPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetSecurityPolicy#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param backendService Name of the BackendService resource to which the security policy should be set. The name should * conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyReference} * @since 1.13 */ protected SetSecurityPolicy(java.lang.String project, java.lang.String region, java.lang.String backendService, com.google.api.services.compute.model.SecurityPolicyReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.backendService = com.google.api.client.util.Preconditions.checkNotNull(backendService, "Required parameter backendService must be specified."); } @Override public SetSecurityPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetSecurityPolicy) super.set$Xgafv($Xgafv); } @Override public SetSecurityPolicy setAccessToken(java.lang.String accessToken) { return (SetSecurityPolicy) super.setAccessToken(accessToken); } @Override public SetSecurityPolicy setAlt(java.lang.String alt) { return (SetSecurityPolicy) super.setAlt(alt); } @Override public SetSecurityPolicy setCallback(java.lang.String callback) { return (SetSecurityPolicy) super.setCallback(callback); } @Override public SetSecurityPolicy setFields(java.lang.String fields) { return (SetSecurityPolicy) super.setFields(fields); } @Override public SetSecurityPolicy setKey(java.lang.String key) { return (SetSecurityPolicy) super.setKey(key); } @Override public SetSecurityPolicy setOauthToken(java.lang.String oauthToken) { return (SetSecurityPolicy) super.setOauthToken(oauthToken); } @Override public SetSecurityPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetSecurityPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetSecurityPolicy setQuotaUser(java.lang.String quotaUser) { return (SetSecurityPolicy) super.setQuotaUser(quotaUser); } @Override public SetSecurityPolicy setUploadType(java.lang.String uploadType) { return (SetSecurityPolicy) super.setUploadType(uploadType); } @Override public SetSecurityPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetSecurityPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetSecurityPolicy setUserIp(java.lang.String userIp) { return (SetSecurityPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetSecurityPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public SetSecurityPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * Name of the BackendService resource to which the security policy should be set. The name * should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String backendService; /** Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035. */ public java.lang.String getBackendService() { return backendService; } /** * Name of the BackendService resource to which the security policy should be set. The name * should conform to RFC1035. */ public SetSecurityPolicy setBackendService(java.lang.String backendService) { this.backendService = backendService; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetSecurityPolicy setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetSecurityPolicy set(String parameterName, Object value) { return (SetSecurityPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "regionBackendServices.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, region, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "regionBackendServices.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public TestIamPermissions setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } /** * Updates the specified regional BackendService resource with the data included in the request. For * more information, see Backend services overview . * * Create a request for the method "regionBackendServices.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param backendService Name of the BackendService resource to update. * @param content the {@link com.google.api.services.compute.model.BackendService} * @return the request */ public Update update(java.lang.String project, java.lang.String region, java.lang.String backendService, com.google.api.services.compute.model.BackendService content) throws java.io.IOException { Update result = new Update(project, region, backendService, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/backendServices/{backendService}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern BACKEND_SERVICE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified regional BackendService resource with the data included in the request. * For more information, see Backend services overview . * * Create a request for the method "regionBackendServices.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param backendService Name of the BackendService resource to update. * @param content the {@link com.google.api.services.compute.model.BackendService} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String region, java.lang.String backendService, com.google.api.services.compute.model.BackendService content) { super(Compute.this, "PUT", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.backendService = com.google.api.client.util.Preconditions.checkNotNull(backendService, "Required parameter backendService must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Update setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the BackendService resource to update. */ @com.google.api.client.util.Key private java.lang.String backendService; /** Name of the BackendService resource to update. */ public java.lang.String getBackendService() { return backendService; } /** Name of the BackendService resource to update. */ public Update setBackendService(java.lang.String backendService) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(BACKEND_SERVICE_PATTERN.matcher(backendService).matches(), "Parameter backendService must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.backendService = backendService; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionCommitments collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionCommitments.List request = compute.regionCommitments().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionCommitments regionCommitments() { return new RegionCommitments(); } /** * The "regionCommitments" collection of methods. */ public class RegionCommitments { /** * Retrieves an aggregated list of commitments by region. To prevent failure, Google recommends that * you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "regionCommitments.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/commitments"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of commitments by region. To prevent failure, Google recommends * that you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "regionCommitments.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.CommitmentAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Returns the specified commitment resource. * * Create a request for the method "regionCommitments.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param commitment Name of the commitment to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String commitment) throws java.io.IOException { Get result = new Get(project, region, commitment); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/commitments/{commitment}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern COMMITMENT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified commitment resource. * * Create a request for the method "regionCommitments.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param commitment Name of the commitment to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String commitment) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Commitment.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.commitment = com.google.api.client.util.Preconditions.checkNotNull(commitment, "Required parameter commitment must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(COMMITMENT_PATTERN.matcher(commitment).matches(), "Parameter commitment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the commitment to return. */ @com.google.api.client.util.Key private java.lang.String commitment; /** Name of the commitment to return. */ public java.lang.String getCommitment() { return commitment; } /** Name of the commitment to return. */ public Get setCommitment(java.lang.String commitment) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(COMMITMENT_PATTERN.matcher(commitment).matches(), "Parameter commitment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.commitment = commitment; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a commitment in the specified project using the data included in the request. * * Create a request for the method "regionCommitments.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.Commitment} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Commitment content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/commitments"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a commitment in the specified project using the data included in the request. * * Create a request for the method "regionCommitments.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.Commitment} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Commitment content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of commitments contained within the specified region. * * Create a request for the method "regionCommitments.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/commitments"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of commitments contained within the specified region. * * Create a request for the method "regionCommitments.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.CommitmentList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the specified commitment with the data included in the request. Update is performed only * on selected fields included as part of update-mask. Only the following fields can be modified: * auto_renew. * * Create a request for the method "regionCommitments.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param commitment Name of the commitment for which auto renew is being updated. * @param content the {@link com.google.api.services.compute.model.Commitment} * @return the request */ public Update update(java.lang.String project, java.lang.String region, java.lang.String commitment, com.google.api.services.compute.model.Commitment content) throws java.io.IOException { Update result = new Update(project, region, commitment, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/commitments/{commitment}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern COMMITMENT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified commitment with the data included in the request. Update is performed * only on selected fields included as part of update-mask. Only the following fields can be * modified: auto_renew. * * Create a request for the method "regionCommitments.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param commitment Name of the commitment for which auto renew is being updated. * @param content the {@link com.google.api.services.compute.model.Commitment} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String region, java.lang.String commitment, com.google.api.services.compute.model.Commitment content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.commitment = com.google.api.client.util.Preconditions.checkNotNull(commitment, "Required parameter commitment must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(COMMITMENT_PATTERN.matcher(commitment).matches(), "Parameter commitment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Update setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the commitment for which auto renew is being updated. */ @com.google.api.client.util.Key private java.lang.String commitment; /** Name of the commitment for which auto renew is being updated. */ public java.lang.String getCommitment() { return commitment; } /** Name of the commitment for which auto renew is being updated. */ public Update setCommitment(java.lang.String commitment) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(COMMITMENT_PATTERN.matcher(commitment).matches(), "Parameter commitment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.commitment = commitment; return this; } @com.google.api.client.util.Key private java.util.List paths; /** */ public java.util.List getPaths() { return paths; } public Update setPaths(java.util.List paths) { this.paths = paths; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** update_mask indicates fields to be updated as part of this request. */ @com.google.api.client.util.Key private String updateMask; /** update_mask indicates fields to be updated as part of this request. */ public String getUpdateMask() { return updateMask; } /** update_mask indicates fields to be updated as part of this request. */ public Update setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionDiskTypes collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionDiskTypes.List request = compute.regionDiskTypes().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionDiskTypes regionDiskTypes() { return new RegionDiskTypes(); } /** * The "regionDiskTypes" collection of methods. */ public class RegionDiskTypes { /** * Returns the specified regional disk type. * * Create a request for the method "regionDiskTypes.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param diskType Name of the disk type to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String diskType) throws java.io.IOException { Get result = new Get(project, region, diskType); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/diskTypes/{diskType}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_TYPE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified regional disk type. * * Create a request for the method "regionDiskTypes.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region The name of the region for this request. * @param diskType Name of the disk type to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String diskType) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.DiskType.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.diskType = com.google.api.client.util.Preconditions.checkNotNull(diskType, "Required parameter diskType must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_TYPE_PATTERN.matcher(diskType).matches(), "Parameter diskType must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the disk type to return. */ @com.google.api.client.util.Key private java.lang.String diskType; /** Name of the disk type to return. */ public java.lang.String getDiskType() { return diskType; } /** Name of the disk type to return. */ public Get setDiskType(java.lang.String diskType) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_TYPE_PATTERN.matcher(diskType).matches(), "Parameter diskType must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.diskType = diskType; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves a list of regional disk types available to the specified project. * * Create a request for the method "regionDiskTypes.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/diskTypes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of regional disk types available to the specified project. * * Create a request for the method "regionDiskTypes.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region The name of the region for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.RegionDiskTypeList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionDisks collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionDisks.List request = compute.regionDisks().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionDisks regionDisks() { return new RegionDisks(); } /** * The "regionDisks" collection of methods. */ public class RegionDisks { /** * Adds existing resource policies to a regional disk. You can only add one policy which will be * applied to this disk for scheduling snapshot creation. * * Create a request for the method "regionDisks.addResourcePolicies". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddResourcePolicies#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param disk The disk name for this request. * @param content the {@link com.google.api.services.compute.model.RegionDisksAddResourcePoliciesRequest} * @return the request */ public AddResourcePolicies addResourcePolicies(java.lang.String project, java.lang.String region, java.lang.String disk, com.google.api.services.compute.model.RegionDisksAddResourcePoliciesRequest content) throws java.io.IOException { AddResourcePolicies result = new AddResourcePolicies(project, region, disk, content); initialize(result); return result; } public class AddResourcePolicies extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks/{disk}/addResourcePolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Adds existing resource policies to a regional disk. You can only add one policy which will be * applied to this disk for scheduling snapshot creation. * * Create a request for the method "regionDisks.addResourcePolicies". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddResourcePolicies#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param disk The disk name for this request. * @param content the {@link com.google.api.services.compute.model.RegionDisksAddResourcePoliciesRequest} * @since 1.13 */ protected AddResourcePolicies(java.lang.String project, java.lang.String region, java.lang.String disk, com.google.api.services.compute.model.RegionDisksAddResourcePoliciesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public AddResourcePolicies set$Xgafv(java.lang.String $Xgafv) { return (AddResourcePolicies) super.set$Xgafv($Xgafv); } @Override public AddResourcePolicies setAccessToken(java.lang.String accessToken) { return (AddResourcePolicies) super.setAccessToken(accessToken); } @Override public AddResourcePolicies setAlt(java.lang.String alt) { return (AddResourcePolicies) super.setAlt(alt); } @Override public AddResourcePolicies setCallback(java.lang.String callback) { return (AddResourcePolicies) super.setCallback(callback); } @Override public AddResourcePolicies setFields(java.lang.String fields) { return (AddResourcePolicies) super.setFields(fields); } @Override public AddResourcePolicies setKey(java.lang.String key) { return (AddResourcePolicies) super.setKey(key); } @Override public AddResourcePolicies setOauthToken(java.lang.String oauthToken) { return (AddResourcePolicies) super.setOauthToken(oauthToken); } @Override public AddResourcePolicies setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddResourcePolicies) super.setPrettyPrint(prettyPrint); } @Override public AddResourcePolicies setQuotaUser(java.lang.String quotaUser) { return (AddResourcePolicies) super.setQuotaUser(quotaUser); } @Override public AddResourcePolicies setUploadType(java.lang.String uploadType) { return (AddResourcePolicies) super.setUploadType(uploadType); } @Override public AddResourcePolicies setUploadProtocol(java.lang.String uploadProtocol) { return (AddResourcePolicies) super.setUploadProtocol(uploadProtocol); } @Override public AddResourcePolicies setUserIp(java.lang.String userIp) { return (AddResourcePolicies) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddResourcePolicies setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public AddResourcePolicies setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** The disk name for this request. */ @com.google.api.client.util.Key private java.lang.String disk; /** The disk name for this request. */ public java.lang.String getDisk() { return disk; } /** The disk name for this request. */ public AddResourcePolicies setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddResourcePolicies setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddResourcePolicies set(String parameterName, Object value) { return (AddResourcePolicies) super.set(parameterName, value); } } /** * Bulk create a set of disks. * * Create a request for the method "regionDisks.bulkInsert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link BulkInsert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param content the {@link com.google.api.services.compute.model.BulkInsertDiskResource} * @return the request */ public BulkInsert bulkInsert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.BulkInsertDiskResource content) throws java.io.IOException { BulkInsert result = new BulkInsert(project, region, content); initialize(result); return result; } public class BulkInsert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks/bulkInsert"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Bulk create a set of disks. * * Create a request for the method "regionDisks.bulkInsert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link BulkInsert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param content the {@link com.google.api.services.compute.model.BulkInsertDiskResource} * @since 1.13 */ protected BulkInsert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.BulkInsertDiskResource content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public BulkInsert set$Xgafv(java.lang.String $Xgafv) { return (BulkInsert) super.set$Xgafv($Xgafv); } @Override public BulkInsert setAccessToken(java.lang.String accessToken) { return (BulkInsert) super.setAccessToken(accessToken); } @Override public BulkInsert setAlt(java.lang.String alt) { return (BulkInsert) super.setAlt(alt); } @Override public BulkInsert setCallback(java.lang.String callback) { return (BulkInsert) super.setCallback(callback); } @Override public BulkInsert setFields(java.lang.String fields) { return (BulkInsert) super.setFields(fields); } @Override public BulkInsert setKey(java.lang.String key) { return (BulkInsert) super.setKey(key); } @Override public BulkInsert setOauthToken(java.lang.String oauthToken) { return (BulkInsert) super.setOauthToken(oauthToken); } @Override public BulkInsert setPrettyPrint(java.lang.Boolean prettyPrint) { return (BulkInsert) super.setPrettyPrint(prettyPrint); } @Override public BulkInsert setQuotaUser(java.lang.String quotaUser) { return (BulkInsert) super.setQuotaUser(quotaUser); } @Override public BulkInsert setUploadType(java.lang.String uploadType) { return (BulkInsert) super.setUploadType(uploadType); } @Override public BulkInsert setUploadProtocol(java.lang.String uploadProtocol) { return (BulkInsert) super.setUploadProtocol(uploadProtocol); } @Override public BulkInsert setUserIp(java.lang.String userIp) { return (BulkInsert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public BulkInsert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public BulkInsert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public BulkInsert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public BulkInsert set(String parameterName, Object value) { return (BulkInsert) super.set(parameterName, value); } } /** * Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using * snapshots.insert instead, as that method supports more features, such as creating snapshots in a * project different from the source disk project. * * Create a request for the method "regionDisks.createSnapshot". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link CreateSnapshot#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param disk Name of the regional persistent disk to snapshot. * @param content the {@link com.google.api.services.compute.model.Snapshot} * @return the request */ public CreateSnapshot createSnapshot(java.lang.String project, java.lang.String region, java.lang.String disk, com.google.api.services.compute.model.Snapshot content) throws java.io.IOException { CreateSnapshot result = new CreateSnapshot(project, region, disk, content); initialize(result); return result; } public class CreateSnapshot extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks/{disk}/createSnapshot"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider * using snapshots.insert instead, as that method supports more features, such as creating * snapshots in a project different from the source disk project. * * Create a request for the method "regionDisks.createSnapshot". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link CreateSnapshot#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param disk Name of the regional persistent disk to snapshot. * @param content the {@link com.google.api.services.compute.model.Snapshot} * @since 1.13 */ protected CreateSnapshot(java.lang.String project, java.lang.String region, java.lang.String disk, com.google.api.services.compute.model.Snapshot content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public CreateSnapshot set$Xgafv(java.lang.String $Xgafv) { return (CreateSnapshot) super.set$Xgafv($Xgafv); } @Override public CreateSnapshot setAccessToken(java.lang.String accessToken) { return (CreateSnapshot) super.setAccessToken(accessToken); } @Override public CreateSnapshot setAlt(java.lang.String alt) { return (CreateSnapshot) super.setAlt(alt); } @Override public CreateSnapshot setCallback(java.lang.String callback) { return (CreateSnapshot) super.setCallback(callback); } @Override public CreateSnapshot setFields(java.lang.String fields) { return (CreateSnapshot) super.setFields(fields); } @Override public CreateSnapshot setKey(java.lang.String key) { return (CreateSnapshot) super.setKey(key); } @Override public CreateSnapshot setOauthToken(java.lang.String oauthToken) { return (CreateSnapshot) super.setOauthToken(oauthToken); } @Override public CreateSnapshot setPrettyPrint(java.lang.Boolean prettyPrint) { return (CreateSnapshot) super.setPrettyPrint(prettyPrint); } @Override public CreateSnapshot setQuotaUser(java.lang.String quotaUser) { return (CreateSnapshot) super.setQuotaUser(quotaUser); } @Override public CreateSnapshot setUploadType(java.lang.String uploadType) { return (CreateSnapshot) super.setUploadType(uploadType); } @Override public CreateSnapshot setUploadProtocol(java.lang.String uploadProtocol) { return (CreateSnapshot) super.setUploadProtocol(uploadProtocol); } @Override public CreateSnapshot setUserIp(java.lang.String userIp) { return (CreateSnapshot) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public CreateSnapshot setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public CreateSnapshot setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the regional persistent disk to snapshot. */ @com.google.api.client.util.Key private java.lang.String disk; /** Name of the regional persistent disk to snapshot. */ public java.lang.String getDisk() { return disk; } /** Name of the regional persistent disk to snapshot. */ public CreateSnapshot setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public CreateSnapshot setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public CreateSnapshot set(String parameterName, Object value) { return (CreateSnapshot) super.set(parameterName, value); } } /** * Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas * of its data permanently and is irreversible. However, deleting a disk does not delete any * snapshots previously made from the disk. You must separately delete snapshots. * * Create a request for the method "regionDisks.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param disk Name of the regional persistent disk to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String disk) throws java.io.IOException { Delete result = new Delete(project, region, disk); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks/{disk}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Deletes the specified regional persistent disk. Deleting a regional disk removes all the * replicas of its data permanently and is irreversible. However, deleting a disk does not delete * any snapshots previously made from the disk. You must separately delete snapshots. * * Create a request for the method "regionDisks.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param disk Name of the regional persistent disk to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String disk) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the regional persistent disk to delete. */ @com.google.api.client.util.Key private java.lang.String disk; /** Name of the regional persistent disk to delete. */ public java.lang.String getDisk() { return disk; } /** Name of the regional persistent disk to delete. */ public Delete setDisk(java.lang.String disk) { this.disk = disk; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns a specified regional persistent disk. * * Create a request for the method "regionDisks.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param disk Name of the regional persistent disk to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String disk) throws java.io.IOException { Get result = new Get(project, region, disk); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks/{disk}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns a specified regional persistent disk. * * Create a request for the method "regionDisks.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param disk Name of the regional persistent disk to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String disk) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Disk.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the regional persistent disk to return. */ @com.google.api.client.util.Key private java.lang.String disk; /** Name of the regional persistent disk to return. */ public java.lang.String getDisk() { return disk; } /** Name of the regional persistent disk to return. */ public Get setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "regionDisks.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, region, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "regionDisks.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public GetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a persistent regional disk in the specified project using the data included in the * request. * * Create a request for the method "regionDisks.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.Disk} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Disk content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a persistent regional disk in the specified project using the data included in the * request. * * Create a request for the method "regionDisks.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.Disk} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Disk content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** Source image to restore onto a disk. This field is optional. */ @com.google.api.client.util.Key private java.lang.String sourceImage; /** Source image to restore onto a disk. This field is optional. */ public java.lang.String getSourceImage() { return sourceImage; } /** Source image to restore onto a disk. This field is optional. */ public Insert setSourceImage(java.lang.String sourceImage) { this.sourceImage = sourceImage; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of persistent disks contained within the specified region. * * Create a request for the method "regionDisks.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves the list of persistent disks contained within the specified region. * * Create a request for the method "regionDisks.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.DiskList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Removes resource policies from a regional disk. * * Create a request for the method "regionDisks.removeResourcePolicies". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RemoveResourcePolicies#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param disk The disk name for this request. * @param content the {@link com.google.api.services.compute.model.RegionDisksRemoveResourcePoliciesRequest} * @return the request */ public RemoveResourcePolicies removeResourcePolicies(java.lang.String project, java.lang.String region, java.lang.String disk, com.google.api.services.compute.model.RegionDisksRemoveResourcePoliciesRequest content) throws java.io.IOException { RemoveResourcePolicies result = new RemoveResourcePolicies(project, region, disk, content); initialize(result); return result; } public class RemoveResourcePolicies extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks/{disk}/removeResourcePolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Removes resource policies from a regional disk. * * Create a request for the method "regionDisks.removeResourcePolicies". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RemoveResourcePolicies#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param disk The disk name for this request. * @param content the {@link com.google.api.services.compute.model.RegionDisksRemoveResourcePoliciesRequest} * @since 1.13 */ protected RemoveResourcePolicies(java.lang.String project, java.lang.String region, java.lang.String disk, com.google.api.services.compute.model.RegionDisksRemoveResourcePoliciesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public RemoveResourcePolicies set$Xgafv(java.lang.String $Xgafv) { return (RemoveResourcePolicies) super.set$Xgafv($Xgafv); } @Override public RemoveResourcePolicies setAccessToken(java.lang.String accessToken) { return (RemoveResourcePolicies) super.setAccessToken(accessToken); } @Override public RemoveResourcePolicies setAlt(java.lang.String alt) { return (RemoveResourcePolicies) super.setAlt(alt); } @Override public RemoveResourcePolicies setCallback(java.lang.String callback) { return (RemoveResourcePolicies) super.setCallback(callback); } @Override public RemoveResourcePolicies setFields(java.lang.String fields) { return (RemoveResourcePolicies) super.setFields(fields); } @Override public RemoveResourcePolicies setKey(java.lang.String key) { return (RemoveResourcePolicies) super.setKey(key); } @Override public RemoveResourcePolicies setOauthToken(java.lang.String oauthToken) { return (RemoveResourcePolicies) super.setOauthToken(oauthToken); } @Override public RemoveResourcePolicies setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveResourcePolicies) super.setPrettyPrint(prettyPrint); } @Override public RemoveResourcePolicies setQuotaUser(java.lang.String quotaUser) { return (RemoveResourcePolicies) super.setQuotaUser(quotaUser); } @Override public RemoveResourcePolicies setUploadType(java.lang.String uploadType) { return (RemoveResourcePolicies) super.setUploadType(uploadType); } @Override public RemoveResourcePolicies setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveResourcePolicies) super.setUploadProtocol(uploadProtocol); } @Override public RemoveResourcePolicies setUserIp(java.lang.String userIp) { return (RemoveResourcePolicies) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public RemoveResourcePolicies setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public RemoveResourcePolicies setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** The disk name for this request. */ @com.google.api.client.util.Key private java.lang.String disk; /** The disk name for this request. */ public java.lang.String getDisk() { return disk; } /** The disk name for this request. */ public RemoveResourcePolicies setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public RemoveResourcePolicies setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public RemoveResourcePolicies set(String parameterName, Object value) { return (RemoveResourcePolicies) super.set(parameterName, value); } } /** * Resizes the specified regional persistent disk. * * Create a request for the method "regionDisks.resize". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Resize#execute()} method to invoke the remote operation. * * @param project The project ID for this request. * @param region Name of the region for this request. * @param disk Name of the regional persistent disk. * @param content the {@link com.google.api.services.compute.model.RegionDisksResizeRequest} * @return the request */ public Resize resize(java.lang.String project, java.lang.String region, java.lang.String disk, com.google.api.services.compute.model.RegionDisksResizeRequest content) throws java.io.IOException { Resize result = new Resize(project, region, disk, content); initialize(result); return result; } public class Resize extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks/{disk}/resize"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Resizes the specified regional persistent disk. * * Create a request for the method "regionDisks.resize". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Resize#execute()} method to invoke the remote operation.

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

* * @param project The project ID for this request. * @param region Name of the region for this request. * @param disk Name of the regional persistent disk. * @param content the {@link com.google.api.services.compute.model.RegionDisksResizeRequest} * @since 1.13 */ protected Resize(java.lang.String project, java.lang.String region, java.lang.String disk, com.google.api.services.compute.model.RegionDisksResizeRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Resize set$Xgafv(java.lang.String $Xgafv) { return (Resize) super.set$Xgafv($Xgafv); } @Override public Resize setAccessToken(java.lang.String accessToken) { return (Resize) super.setAccessToken(accessToken); } @Override public Resize setAlt(java.lang.String alt) { return (Resize) super.setAlt(alt); } @Override public Resize setCallback(java.lang.String callback) { return (Resize) super.setCallback(callback); } @Override public Resize setFields(java.lang.String fields) { return (Resize) super.setFields(fields); } @Override public Resize setKey(java.lang.String key) { return (Resize) super.setKey(key); } @Override public Resize setOauthToken(java.lang.String oauthToken) { return (Resize) super.setOauthToken(oauthToken); } @Override public Resize setPrettyPrint(java.lang.Boolean prettyPrint) { return (Resize) super.setPrettyPrint(prettyPrint); } @Override public Resize setQuotaUser(java.lang.String quotaUser) { return (Resize) super.setQuotaUser(quotaUser); } @Override public Resize setUploadType(java.lang.String uploadType) { return (Resize) super.setUploadType(uploadType); } @Override public Resize setUploadProtocol(java.lang.String uploadProtocol) { return (Resize) super.setUploadProtocol(uploadProtocol); } @Override public Resize setUserIp(java.lang.String userIp) { return (Resize) super.setUserIp(userIp); } /** The project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** The project ID for this request. */ public java.lang.String getProject() { return project; } /** The project ID for this request. */ public Resize setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Resize setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the regional persistent disk. */ @com.google.api.client.util.Key private java.lang.String disk; /** Name of the regional persistent disk. */ public java.lang.String getDisk() { return disk; } /** Name of the regional persistent disk. */ public Resize setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Resize setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Resize set(String parameterName, Object value) { return (Resize) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "regionDisks.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, region, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "regionDisks.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public SetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Sets the labels on the target regional disk. * * Create a request for the method "regionDisks.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, region, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on the target regional disk. * * Create a request for the method "regionDisks.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The region for this request. */ public java.lang.String getRegion() { return region; } /** The region for this request. */ public SetLabels setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetLabels setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } /** * Starts asynchronous replication. Must be invoked on the primary disk. * * Create a request for the method "regionDisks.startAsyncReplication". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link StartAsyncReplication#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param disk The name of the persistent disk. * @param content the {@link com.google.api.services.compute.model.RegionDisksStartAsyncReplicationRequest} * @return the request */ public StartAsyncReplication startAsyncReplication(java.lang.String project, java.lang.String region, java.lang.String disk, com.google.api.services.compute.model.RegionDisksStartAsyncReplicationRequest content) throws java.io.IOException { StartAsyncReplication result = new StartAsyncReplication(project, region, disk, content); initialize(result); return result; } public class StartAsyncReplication extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks/{disk}/startAsyncReplication"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Starts asynchronous replication. Must be invoked on the primary disk. * * Create a request for the method "regionDisks.startAsyncReplication". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link StartAsyncReplication#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param disk The name of the persistent disk. * @param content the {@link com.google.api.services.compute.model.RegionDisksStartAsyncReplicationRequest} * @since 1.13 */ protected StartAsyncReplication(java.lang.String project, java.lang.String region, java.lang.String disk, com.google.api.services.compute.model.RegionDisksStartAsyncReplicationRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public StartAsyncReplication set$Xgafv(java.lang.String $Xgafv) { return (StartAsyncReplication) super.set$Xgafv($Xgafv); } @Override public StartAsyncReplication setAccessToken(java.lang.String accessToken) { return (StartAsyncReplication) super.setAccessToken(accessToken); } @Override public StartAsyncReplication setAlt(java.lang.String alt) { return (StartAsyncReplication) super.setAlt(alt); } @Override public StartAsyncReplication setCallback(java.lang.String callback) { return (StartAsyncReplication) super.setCallback(callback); } @Override public StartAsyncReplication setFields(java.lang.String fields) { return (StartAsyncReplication) super.setFields(fields); } @Override public StartAsyncReplication setKey(java.lang.String key) { return (StartAsyncReplication) super.setKey(key); } @Override public StartAsyncReplication setOauthToken(java.lang.String oauthToken) { return (StartAsyncReplication) super.setOauthToken(oauthToken); } @Override public StartAsyncReplication setPrettyPrint(java.lang.Boolean prettyPrint) { return (StartAsyncReplication) super.setPrettyPrint(prettyPrint); } @Override public StartAsyncReplication setQuotaUser(java.lang.String quotaUser) { return (StartAsyncReplication) super.setQuotaUser(quotaUser); } @Override public StartAsyncReplication setUploadType(java.lang.String uploadType) { return (StartAsyncReplication) super.setUploadType(uploadType); } @Override public StartAsyncReplication setUploadProtocol(java.lang.String uploadProtocol) { return (StartAsyncReplication) super.setUploadProtocol(uploadProtocol); } @Override public StartAsyncReplication setUserIp(java.lang.String userIp) { return (StartAsyncReplication) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public StartAsyncReplication setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public StartAsyncReplication setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** The name of the persistent disk. */ @com.google.api.client.util.Key private java.lang.String disk; /** The name of the persistent disk. */ public java.lang.String getDisk() { return disk; } /** The name of the persistent disk. */ public StartAsyncReplication setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public StartAsyncReplication setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public StartAsyncReplication set(String parameterName, Object value) { return (StartAsyncReplication) super.set(parameterName, value); } } /** * Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk. * * Create a request for the method "regionDisks.stopAsyncReplication". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link StopAsyncReplication#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param disk The name of the persistent disk. * @return the request */ public StopAsyncReplication stopAsyncReplication(java.lang.String project, java.lang.String region, java.lang.String disk) throws java.io.IOException { StopAsyncReplication result = new StopAsyncReplication(project, region, disk); initialize(result); return result; } public class StopAsyncReplication extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks/{disk}/stopAsyncReplication"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk. * * Create a request for the method "regionDisks.stopAsyncReplication". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link StopAsyncReplication#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param disk The name of the persistent disk. * @since 1.13 */ protected StopAsyncReplication(java.lang.String project, java.lang.String region, java.lang.String disk) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public StopAsyncReplication set$Xgafv(java.lang.String $Xgafv) { return (StopAsyncReplication) super.set$Xgafv($Xgafv); } @Override public StopAsyncReplication setAccessToken(java.lang.String accessToken) { return (StopAsyncReplication) super.setAccessToken(accessToken); } @Override public StopAsyncReplication setAlt(java.lang.String alt) { return (StopAsyncReplication) super.setAlt(alt); } @Override public StopAsyncReplication setCallback(java.lang.String callback) { return (StopAsyncReplication) super.setCallback(callback); } @Override public StopAsyncReplication setFields(java.lang.String fields) { return (StopAsyncReplication) super.setFields(fields); } @Override public StopAsyncReplication setKey(java.lang.String key) { return (StopAsyncReplication) super.setKey(key); } @Override public StopAsyncReplication setOauthToken(java.lang.String oauthToken) { return (StopAsyncReplication) super.setOauthToken(oauthToken); } @Override public StopAsyncReplication setPrettyPrint(java.lang.Boolean prettyPrint) { return (StopAsyncReplication) super.setPrettyPrint(prettyPrint); } @Override public StopAsyncReplication setQuotaUser(java.lang.String quotaUser) { return (StopAsyncReplication) super.setQuotaUser(quotaUser); } @Override public StopAsyncReplication setUploadType(java.lang.String uploadType) { return (StopAsyncReplication) super.setUploadType(uploadType); } @Override public StopAsyncReplication setUploadProtocol(java.lang.String uploadProtocol) { return (StopAsyncReplication) super.setUploadProtocol(uploadProtocol); } @Override public StopAsyncReplication setUserIp(java.lang.String userIp) { return (StopAsyncReplication) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public StopAsyncReplication setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public StopAsyncReplication setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** The name of the persistent disk. */ @com.google.api.client.util.Key private java.lang.String disk; /** The name of the persistent disk. */ public java.lang.String getDisk() { return disk; } /** The name of the persistent disk. */ public StopAsyncReplication setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public StopAsyncReplication setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public StopAsyncReplication set(String parameterName, Object value) { return (StopAsyncReplication) super.set(parameterName, value); } } /** * Stops asynchronous replication for a consistency group of disks. Can be invoked either in the * primary or secondary scope. * * Create a request for the method "regionDisks.stopGroupAsyncReplication". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link StopGroupAsyncReplication#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region The name of the region for this request. This must be the region of the primary or secondary disks * in the consistency group. * @param content the {@link com.google.api.services.compute.model.DisksStopGroupAsyncReplicationResource} * @return the request */ public StopGroupAsyncReplication stopGroupAsyncReplication(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.DisksStopGroupAsyncReplicationResource content) throws java.io.IOException { StopGroupAsyncReplication result = new StopGroupAsyncReplication(project, region, content); initialize(result); return result; } public class StopGroupAsyncReplication extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks/stopGroupAsyncReplication"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Stops asynchronous replication for a consistency group of disks. Can be invoked either in the * primary or secondary scope. * * Create a request for the method "regionDisks.stopGroupAsyncReplication". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link StopGroupAsyncReplication#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. This must be the region of the primary or secondary disks * in the consistency group. * @param content the {@link com.google.api.services.compute.model.DisksStopGroupAsyncReplicationResource} * @since 1.13 */ protected StopGroupAsyncReplication(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.DisksStopGroupAsyncReplicationResource content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public StopGroupAsyncReplication set$Xgafv(java.lang.String $Xgafv) { return (StopGroupAsyncReplication) super.set$Xgafv($Xgafv); } @Override public StopGroupAsyncReplication setAccessToken(java.lang.String accessToken) { return (StopGroupAsyncReplication) super.setAccessToken(accessToken); } @Override public StopGroupAsyncReplication setAlt(java.lang.String alt) { return (StopGroupAsyncReplication) super.setAlt(alt); } @Override public StopGroupAsyncReplication setCallback(java.lang.String callback) { return (StopGroupAsyncReplication) super.setCallback(callback); } @Override public StopGroupAsyncReplication setFields(java.lang.String fields) { return (StopGroupAsyncReplication) super.setFields(fields); } @Override public StopGroupAsyncReplication setKey(java.lang.String key) { return (StopGroupAsyncReplication) super.setKey(key); } @Override public StopGroupAsyncReplication setOauthToken(java.lang.String oauthToken) { return (StopGroupAsyncReplication) super.setOauthToken(oauthToken); } @Override public StopGroupAsyncReplication setPrettyPrint(java.lang.Boolean prettyPrint) { return (StopGroupAsyncReplication) super.setPrettyPrint(prettyPrint); } @Override public StopGroupAsyncReplication setQuotaUser(java.lang.String quotaUser) { return (StopGroupAsyncReplication) super.setQuotaUser(quotaUser); } @Override public StopGroupAsyncReplication setUploadType(java.lang.String uploadType) { return (StopGroupAsyncReplication) super.setUploadType(uploadType); } @Override public StopGroupAsyncReplication setUploadProtocol(java.lang.String uploadProtocol) { return (StopGroupAsyncReplication) super.setUploadProtocol(uploadProtocol); } @Override public StopGroupAsyncReplication setUserIp(java.lang.String userIp) { return (StopGroupAsyncReplication) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public StopGroupAsyncReplication setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the region for this request. This must be the region of the primary or * secondary disks in the consistency group. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. This must be the region of the primary or secondary disks in the consistency group. */ public java.lang.String getRegion() { return region; } /** * The name of the region for this request. This must be the region of the primary or * secondary disks in the consistency group. */ public StopGroupAsyncReplication setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public StopGroupAsyncReplication setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public StopGroupAsyncReplication set(String parameterName, Object value) { return (StopGroupAsyncReplication) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "regionDisks.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, region, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "regionDisks.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public TestIamPermissions setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } /** * Update the specified disk with the data included in the request. Update is performed only on * selected fields included as part of update-mask. Only the following fields can be modified: * user_license. * * Create a request for the method "regionDisks.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param disk The disk name for this request. * @param content the {@link com.google.api.services.compute.model.Disk} * @return the request */ public Update update(java.lang.String project, java.lang.String region, java.lang.String disk, com.google.api.services.compute.model.Disk content) throws java.io.IOException { Update result = new Update(project, region, disk, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/disks/{disk}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern DISK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Update the specified disk with the data included in the request. Update is performed only on * selected fields included as part of update-mask. Only the following fields can be modified: * user_license. * * Create a request for the method "regionDisks.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param disk The disk name for this request. * @param content the {@link com.google.api.services.compute.model.Disk} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String region, java.lang.String disk, com.google.api.services.compute.model.Disk content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.disk = com.google.api.client.util.Preconditions.checkNotNull(disk, "Required parameter disk must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public Update setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** The disk name for this request. */ @com.google.api.client.util.Key private java.lang.String disk; /** The disk name for this request. */ public java.lang.String getDisk() { return disk; } /** The disk name for this request. */ public Update setDisk(java.lang.String disk) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(DISK_PATTERN.matcher(disk).matches(), "Parameter disk must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.disk = disk; return this; } @com.google.api.client.util.Key private java.util.List paths; /** */ public java.util.List getPaths() { return paths; } public Update setPaths(java.util.List paths) { this.paths = paths; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** update_mask indicates fields to be updated as part of this request. */ @com.google.api.client.util.Key private String updateMask; /** update_mask indicates fields to be updated as part of this request. */ public String getUpdateMask() { return updateMask; } /** update_mask indicates fields to be updated as part of this request. */ public Update setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionHealthCheckServices collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionHealthCheckServices.List request = compute.regionHealthCheckServices().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionHealthCheckServices regionHealthCheckServices() { return new RegionHealthCheckServices(); } /** * The "regionHealthCheckServices" collection of methods. */ public class RegionHealthCheckServices { /** * Deletes the specified regional HealthCheckService. * * Create a request for the method "regionHealthCheckServices.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param healthCheckService Name of the HealthCheckService to delete. The name must be 1-63 characters long, and comply with * RFC1035. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String healthCheckService) throws java.io.IOException { Delete result = new Delete(project, region, healthCheckService); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Deletes the specified regional HealthCheckService. * * Create a request for the method "regionHealthCheckServices.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param healthCheckService Name of the HealthCheckService to delete. The name must be 1-63 characters long, and comply with * RFC1035. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String healthCheckService) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.healthCheckService = com.google.api.client.util.Preconditions.checkNotNull(healthCheckService, "Required parameter healthCheckService must be specified."); } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * Name of the HealthCheckService to delete. The name must be 1-63 characters long, and comply * with RFC1035. */ @com.google.api.client.util.Key private java.lang.String healthCheckService; /** Name of the HealthCheckService to delete. The name must be 1-63 characters long, and comply with RFC1035. */ public java.lang.String getHealthCheckService() { return healthCheckService; } /** * Name of the HealthCheckService to delete. The name must be 1-63 characters long, and comply * with RFC1035. */ public Delete setHealthCheckService(java.lang.String healthCheckService) { this.healthCheckService = healthCheckService; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified regional HealthCheckService resource. * * Create a request for the method "regionHealthCheckServices.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param healthCheckService Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply with * RFC1035. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String healthCheckService) throws java.io.IOException { Get result = new Get(project, region, healthCheckService); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Returns the specified regional HealthCheckService resource. * * Create a request for the method "regionHealthCheckServices.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param healthCheckService Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply with * RFC1035. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String healthCheckService) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.HealthCheckService.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.healthCheckService = com.google.api.client.util.Preconditions.checkNotNull(healthCheckService, "Required parameter healthCheckService must be specified."); } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply * with RFC1035. */ @com.google.api.client.util.Key private java.lang.String healthCheckService; /** Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply with RFC1035. */ public java.lang.String getHealthCheckService() { return healthCheckService; } /** * Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply * with RFC1035. */ public Get setHealthCheckService(java.lang.String healthCheckService) { this.healthCheckService = healthCheckService; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a regional HealthCheckService resource in the specified project and region using the data * included in the request. * * Create a request for the method "regionHealthCheckServices.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.HealthCheckService} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.HealthCheckService content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/healthCheckServices"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a regional HealthCheckService resource in the specified project and region using the * data included in the request. * * Create a request for the method "regionHealthCheckServices.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.HealthCheckService} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.HealthCheckService content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists all the HealthCheckService resources that have been configured for the specified project in * the given region. * * Create a request for the method "regionHealthCheckServices.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/healthCheckServices"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Lists all the HealthCheckService resources that have been configured for the specified project * in the given region. * * Create a request for the method "regionHealthCheckServices.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.HealthCheckServicesList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the specified regional HealthCheckService resource with the data included in the request. * This method supports PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "regionHealthCheckServices.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param healthCheckService Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply with * RFC1035. * @param content the {@link com.google.api.services.compute.model.HealthCheckService} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String healthCheckService, com.google.api.services.compute.model.HealthCheckService content) throws java.io.IOException { Patch result = new Patch(project, region, healthCheckService, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Updates the specified regional HealthCheckService resource with the data included in the * request. This method supports PATCH semantics and uses the JSON merge patch format and * processing rules. * * Create a request for the method "regionHealthCheckServices.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param healthCheckService Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply with * RFC1035. * @param content the {@link com.google.api.services.compute.model.HealthCheckService} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String healthCheckService, com.google.api.services.compute.model.HealthCheckService content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.healthCheckService = com.google.api.client.util.Preconditions.checkNotNull(healthCheckService, "Required parameter healthCheckService must be specified."); } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply * with RFC1035. */ @com.google.api.client.util.Key private java.lang.String healthCheckService; /** Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply with RFC1035. */ public java.lang.String getHealthCheckService() { return healthCheckService; } /** * Name of the HealthCheckService to update. The name must be 1-63 characters long, and comply * with RFC1035. */ public Patch setHealthCheckService(java.lang.String healthCheckService) { this.healthCheckService = healthCheckService; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionHealthChecks collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionHealthChecks.List request = compute.regionHealthChecks().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionHealthChecks regionHealthChecks() { return new RegionHealthChecks(); } /** * The "regionHealthChecks" collection of methods. */ public class RegionHealthChecks { /** * Deletes the specified HealthCheck resource. * * Create a request for the method "regionHealthChecks.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param healthCheck Name of the HealthCheck resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String healthCheck) throws java.io.IOException { Delete result = new Delete(project, region, healthCheck); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/healthChecks/{healthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified HealthCheck resource. * * Create a request for the method "regionHealthChecks.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param healthCheck Name of the HealthCheck resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String healthCheck) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.healthCheck = com.google.api.client.util.Preconditions.checkNotNull(healthCheck, "Required parameter healthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the HealthCheck resource to delete. */ @com.google.api.client.util.Key private java.lang.String healthCheck; /** Name of the HealthCheck resource to delete. */ public java.lang.String getHealthCheck() { return healthCheck; } /** Name of the HealthCheck resource to delete. */ public Delete setHealthCheck(java.lang.String healthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.healthCheck = healthCheck; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified HealthCheck resource. * * Create a request for the method "regionHealthChecks.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param healthCheck Name of the HealthCheck resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String healthCheck) throws java.io.IOException { Get result = new Get(project, region, healthCheck); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/healthChecks/{healthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified HealthCheck resource. * * Create a request for the method "regionHealthChecks.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param healthCheck Name of the HealthCheck resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String healthCheck) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.HealthCheck.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.healthCheck = com.google.api.client.util.Preconditions.checkNotNull(healthCheck, "Required parameter healthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the HealthCheck resource to return. */ @com.google.api.client.util.Key private java.lang.String healthCheck; /** Name of the HealthCheck resource to return. */ public java.lang.String getHealthCheck() { return healthCheck; } /** Name of the HealthCheck resource to return. */ public Get setHealthCheck(java.lang.String healthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.healthCheck = healthCheck; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a HealthCheck resource in the specified project using the data included in the request. * * Create a request for the method "regionHealthChecks.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.HealthCheck} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.HealthCheck content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/healthChecks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a HealthCheck resource in the specified project using the data included in the request. * * Create a request for the method "regionHealthChecks.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.HealthCheck} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.HealthCheck content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of HealthCheck resources available to the specified project. * * Create a request for the method "regionHealthChecks.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/healthChecks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves the list of HealthCheck resources available to the specified project. * * Create a request for the method "regionHealthChecks.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.HealthCheckList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates a HealthCheck resource in the specified project using the data included in the request. * This method supports PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "regionHealthChecks.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param healthCheck Name of the HealthCheck resource to patch. * @param content the {@link com.google.api.services.compute.model.HealthCheck} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String healthCheck, com.google.api.services.compute.model.HealthCheck content) throws java.io.IOException { Patch result = new Patch(project, region, healthCheck, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/healthChecks/{healthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates a HealthCheck resource in the specified project using the data included in the request. * This method supports PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "regionHealthChecks.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param healthCheck Name of the HealthCheck resource to patch. * @param content the {@link com.google.api.services.compute.model.HealthCheck} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String healthCheck, com.google.api.services.compute.model.HealthCheck content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.healthCheck = com.google.api.client.util.Preconditions.checkNotNull(healthCheck, "Required parameter healthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the HealthCheck resource to patch. */ @com.google.api.client.util.Key private java.lang.String healthCheck; /** Name of the HealthCheck resource to patch. */ public java.lang.String getHealthCheck() { return healthCheck; } /** Name of the HealthCheck resource to patch. */ public Patch setHealthCheck(java.lang.String healthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.healthCheck = healthCheck; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates a HealthCheck resource in the specified project using the data included in the request. * * Create a request for the method "regionHealthChecks.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param healthCheck Name of the HealthCheck resource to update. * @param content the {@link com.google.api.services.compute.model.HealthCheck} * @return the request */ public Update update(java.lang.String project, java.lang.String region, java.lang.String healthCheck, com.google.api.services.compute.model.HealthCheck content) throws java.io.IOException { Update result = new Update(project, region, healthCheck, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/healthChecks/{healthCheck}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern HEALTH_CHECK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates a HealthCheck resource in the specified project using the data included in the request. * * Create a request for the method "regionHealthChecks.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param healthCheck Name of the HealthCheck resource to update. * @param content the {@link com.google.api.services.compute.model.HealthCheck} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String region, java.lang.String healthCheck, com.google.api.services.compute.model.HealthCheck content) { super(Compute.this, "PUT", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.healthCheck = com.google.api.client.util.Preconditions.checkNotNull(healthCheck, "Required parameter healthCheck must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Update setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the HealthCheck resource to update. */ @com.google.api.client.util.Key private java.lang.String healthCheck; /** Name of the HealthCheck resource to update. */ public java.lang.String getHealthCheck() { return healthCheck; } /** Name of the HealthCheck resource to update. */ public Update setHealthCheck(java.lang.String healthCheck) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(HEALTH_CHECK_PATTERN.matcher(healthCheck).matches(), "Parameter healthCheck must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.healthCheck = healthCheck; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionInstanceGroupManagers collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionInstanceGroupManagers.List request = compute.regionInstanceGroupManagers().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionInstanceGroupManagers regionInstanceGroupManagers() { return new RegionInstanceGroupManagers(); } /** * The "regionInstanceGroupManagers" collection of methods. */ public class RegionInstanceGroupManagers { /** * Flags the specified instances to be immediately removed from the managed instance group. * Abandoning an instance does not delete the instance, but it does remove the instance from any * target pools that are applied by the managed instance group. This method reduces the targetSize * of the managed instance group by the number of instances that you abandon. This operation is * marked as DONE when the action is scheduled even if the instances have not yet been removed from * the group. You must separately verify the status of the abandoning action with the * listmanagedinstances method. If the group is part of a backend service that has enabled * connection draining, it can take up to 60 seconds after the connection draining duration has * elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances * with this method per request. * * Create a request for the method "regionInstanceGroupManagers.abandonInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AbandonInstances#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager Name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagersAbandonInstancesRequest} * @return the request */ public AbandonInstances abandonInstances(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagersAbandonInstancesRequest content) throws java.io.IOException { AbandonInstances result = new AbandonInstances(project, region, instanceGroupManager, content); initialize(result); return result; } public class AbandonInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Flags the specified instances to be immediately removed from the managed instance group. * Abandoning an instance does not delete the instance, but it does remove the instance from any * target pools that are applied by the managed instance group. This method reduces the targetSize * of the managed instance group by the number of instances that you abandon. This operation is * marked as DONE when the action is scheduled even if the instances have not yet been removed * from the group. You must separately verify the status of the abandoning action with the * listmanagedinstances method. If the group is part of a backend service that has enabled * connection draining, it can take up to 60 seconds after the connection draining duration has * elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 * instances with this method per request. * * Create a request for the method "regionInstanceGroupManagers.abandonInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AbandonInstances#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager Name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagersAbandonInstancesRequest} * @since 1.13 */ protected AbandonInstances(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagersAbandonInstancesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public AbandonInstances set$Xgafv(java.lang.String $Xgafv) { return (AbandonInstances) super.set$Xgafv($Xgafv); } @Override public AbandonInstances setAccessToken(java.lang.String accessToken) { return (AbandonInstances) super.setAccessToken(accessToken); } @Override public AbandonInstances setAlt(java.lang.String alt) { return (AbandonInstances) super.setAlt(alt); } @Override public AbandonInstances setCallback(java.lang.String callback) { return (AbandonInstances) super.setCallback(callback); } @Override public AbandonInstances setFields(java.lang.String fields) { return (AbandonInstances) super.setFields(fields); } @Override public AbandonInstances setKey(java.lang.String key) { return (AbandonInstances) super.setKey(key); } @Override public AbandonInstances setOauthToken(java.lang.String oauthToken) { return (AbandonInstances) super.setOauthToken(oauthToken); } @Override public AbandonInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (AbandonInstances) super.setPrettyPrint(prettyPrint); } @Override public AbandonInstances setQuotaUser(java.lang.String quotaUser) { return (AbandonInstances) super.setQuotaUser(quotaUser); } @Override public AbandonInstances setUploadType(java.lang.String uploadType) { return (AbandonInstances) super.setUploadType(uploadType); } @Override public AbandonInstances setUploadProtocol(java.lang.String uploadProtocol) { return (AbandonInstances) super.setUploadProtocol(uploadProtocol); } @Override public AbandonInstances setUserIp(java.lang.String userIp) { return (AbandonInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AbandonInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public AbandonInstances setRegion(java.lang.String region) { this.region = region; return this; } /** Name of the managed instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** Name of the managed instance group. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** Name of the managed instance group. */ public AbandonInstances setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AbandonInstances setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AbandonInstances set(String parameterName, Object value) { return (AbandonInstances) super.set(parameterName, value); } } /** * Apply updates to selected instances the managed instance group. * * Create a request for the method "regionInstanceGroupManagers.applyUpdatesToInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ApplyUpdatesToInstances#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request, should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group, should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagersApplyUpdatesRequest} * @return the request */ public ApplyUpdatesToInstances applyUpdatesToInstances(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagersApplyUpdatesRequest content) throws java.io.IOException { ApplyUpdatesToInstances result = new ApplyUpdatesToInstances(project, region, instanceGroupManager, content); initialize(result); return result; } public class ApplyUpdatesToInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Apply updates to selected instances the managed instance group. * * Create a request for the method "regionInstanceGroupManagers.applyUpdatesToInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ApplyUpdatesToInstances#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request, should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group, should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagersApplyUpdatesRequest} * @since 1.13 */ protected ApplyUpdatesToInstances(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagersApplyUpdatesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public ApplyUpdatesToInstances set$Xgafv(java.lang.String $Xgafv) { return (ApplyUpdatesToInstances) super.set$Xgafv($Xgafv); } @Override public ApplyUpdatesToInstances setAccessToken(java.lang.String accessToken) { return (ApplyUpdatesToInstances) super.setAccessToken(accessToken); } @Override public ApplyUpdatesToInstances setAlt(java.lang.String alt) { return (ApplyUpdatesToInstances) super.setAlt(alt); } @Override public ApplyUpdatesToInstances setCallback(java.lang.String callback) { return (ApplyUpdatesToInstances) super.setCallback(callback); } @Override public ApplyUpdatesToInstances setFields(java.lang.String fields) { return (ApplyUpdatesToInstances) super.setFields(fields); } @Override public ApplyUpdatesToInstances setKey(java.lang.String key) { return (ApplyUpdatesToInstances) super.setKey(key); } @Override public ApplyUpdatesToInstances setOauthToken(java.lang.String oauthToken) { return (ApplyUpdatesToInstances) super.setOauthToken(oauthToken); } @Override public ApplyUpdatesToInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (ApplyUpdatesToInstances) super.setPrettyPrint(prettyPrint); } @Override public ApplyUpdatesToInstances setQuotaUser(java.lang.String quotaUser) { return (ApplyUpdatesToInstances) super.setQuotaUser(quotaUser); } @Override public ApplyUpdatesToInstances setUploadType(java.lang.String uploadType) { return (ApplyUpdatesToInstances) super.setUploadType(uploadType); } @Override public ApplyUpdatesToInstances setUploadProtocol(java.lang.String uploadProtocol) { return (ApplyUpdatesToInstances) super.setUploadProtocol(uploadProtocol); } @Override public ApplyUpdatesToInstances setUserIp(java.lang.String userIp) { return (ApplyUpdatesToInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ApplyUpdatesToInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request, should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request, should conform to RFC1035. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request, should conform to RFC1035. */ public ApplyUpdatesToInstances setRegion(java.lang.String region) { this.region = region; return this; } /** The name of the managed instance group, should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group, should conform to RFC1035. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group, should conform to RFC1035. */ public ApplyUpdatesToInstances setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } @Override public ApplyUpdatesToInstances set(String parameterName, Object value) { return (ApplyUpdatesToInstances) super.set(parameterName, value); } } /** * Creates instances with per-instance configurations in this regional managed instance group. * Instances are created using the current instance template. The create instances operation is * marked DONE if the createInstances request is successful. The underlying actions take additional * time. You must separately verify the status of the creating or actions with the * listmanagedinstances method. * * Create a request for the method "regionInstanceGroupManagers.createInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link CreateInstances#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region where the managed instance group is located. It should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagersCreateInstancesRequest} * @return the request */ public CreateInstances createInstances(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagersCreateInstancesRequest content) throws java.io.IOException { CreateInstances result = new CreateInstances(project, region, instanceGroupManager, content); initialize(result); return result; } public class CreateInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/createInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates instances with per-instance configurations in this regional managed instance group. * Instances are created using the current instance template. The create instances operation is * marked DONE if the createInstances request is successful. The underlying actions take * additional time. You must separately verify the status of the creating or actions with the * listmanagedinstances method. * * Create a request for the method "regionInstanceGroupManagers.createInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link CreateInstances#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region The name of the region where the managed instance group is located. It should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagersCreateInstancesRequest} * @since 1.13 */ protected CreateInstances(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagersCreateInstancesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public CreateInstances set$Xgafv(java.lang.String $Xgafv) { return (CreateInstances) super.set$Xgafv($Xgafv); } @Override public CreateInstances setAccessToken(java.lang.String accessToken) { return (CreateInstances) super.setAccessToken(accessToken); } @Override public CreateInstances setAlt(java.lang.String alt) { return (CreateInstances) super.setAlt(alt); } @Override public CreateInstances setCallback(java.lang.String callback) { return (CreateInstances) super.setCallback(callback); } @Override public CreateInstances setFields(java.lang.String fields) { return (CreateInstances) super.setFields(fields); } @Override public CreateInstances setKey(java.lang.String key) { return (CreateInstances) super.setKey(key); } @Override public CreateInstances setOauthToken(java.lang.String oauthToken) { return (CreateInstances) super.setOauthToken(oauthToken); } @Override public CreateInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (CreateInstances) super.setPrettyPrint(prettyPrint); } @Override public CreateInstances setQuotaUser(java.lang.String quotaUser) { return (CreateInstances) super.setQuotaUser(quotaUser); } @Override public CreateInstances setUploadType(java.lang.String uploadType) { return (CreateInstances) super.setUploadType(uploadType); } @Override public CreateInstances setUploadProtocol(java.lang.String uploadProtocol) { return (CreateInstances) super.setUploadProtocol(uploadProtocol); } @Override public CreateInstances setUserIp(java.lang.String userIp) { return (CreateInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public CreateInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the region where the managed instance group is located. It should conform to * RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region where the managed instance group is located. It should conform to RFC1035. */ public java.lang.String getRegion() { return region; } /** * The name of the region where the managed instance group is located. It should conform to * RFC1035. */ public CreateInstances setRegion(java.lang.String region) { this.region = region; return this; } /** The name of the managed instance group. It should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. It should conform to RFC1035. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. It should conform to RFC1035. */ public CreateInstances setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. The request ID must be a valid UUID with the exception that zero UUID * is not supported ( 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. The request ID must be a valid UUID with the exception that zero UUID * is not supported ( 00000000-0000-0000-0000-000000000000). */ public CreateInstances setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public CreateInstances set(String parameterName, Object value) { return (CreateInstances) super.set(parameterName, value); } } /** * Deletes the specified managed instance group and all of the instances in that group. * * Create a request for the method "regionInstanceGroupManagers.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager Name of the managed instance group to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager) throws java.io.IOException { Delete result = new Delete(project, region, instanceGroupManager); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Deletes the specified managed instance group and all of the instances in that group. * * Create a request for the method "regionInstanceGroupManagers.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager Name of the managed instance group to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { this.region = region; return this; } /** Name of the managed instance group to delete. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** Name of the managed instance group to delete. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** Name of the managed instance group to delete. */ public Delete setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Flags the specified instances in the managed instance group to be immediately deleted. The * instances are also removed from any target pools of which they were a member. This method reduces * the targetSize of the managed instance group by the number of instances that you delete. The * deleteInstances operation is marked DONE if the deleteInstances request is successful. The * underlying actions take additional time. You must separately verify the status of the deleting * action with the listmanagedinstances method. If the group is part of a backend service that has * enabled connection draining, it can take up to 60 seconds after the connection draining duration * has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 * instances with this method per request. * * Create a request for the method "regionInstanceGroupManagers.deleteInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link DeleteInstances#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager Name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagersDeleteInstancesRequest} * @return the request */ public DeleteInstances deleteInstances(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagersDeleteInstancesRequest content) throws java.io.IOException { DeleteInstances result = new DeleteInstances(project, region, instanceGroupManager, content); initialize(result); return result; } public class DeleteInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Flags the specified instances in the managed instance group to be immediately deleted. The * instances are also removed from any target pools of which they were a member. This method * reduces the targetSize of the managed instance group by the number of instances that you * delete. The deleteInstances operation is marked DONE if the deleteInstances request is * successful. The underlying actions take additional time. You must separately verify the status * of the deleting action with the listmanagedinstances method. If the group is part of a backend * service that has enabled connection draining, it can take up to 60 seconds after the connection * draining duration has elapsed before the VM instance is removed or deleted. You can specify a * maximum of 1000 instances with this method per request. * * Create a request for the method "regionInstanceGroupManagers.deleteInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link DeleteInstances#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager Name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagersDeleteInstancesRequest} * @since 1.13 */ protected DeleteInstances(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagersDeleteInstancesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public DeleteInstances set$Xgafv(java.lang.String $Xgafv) { return (DeleteInstances) super.set$Xgafv($Xgafv); } @Override public DeleteInstances setAccessToken(java.lang.String accessToken) { return (DeleteInstances) super.setAccessToken(accessToken); } @Override public DeleteInstances setAlt(java.lang.String alt) { return (DeleteInstances) super.setAlt(alt); } @Override public DeleteInstances setCallback(java.lang.String callback) { return (DeleteInstances) super.setCallback(callback); } @Override public DeleteInstances setFields(java.lang.String fields) { return (DeleteInstances) super.setFields(fields); } @Override public DeleteInstances setKey(java.lang.String key) { return (DeleteInstances) super.setKey(key); } @Override public DeleteInstances setOauthToken(java.lang.String oauthToken) { return (DeleteInstances) super.setOauthToken(oauthToken); } @Override public DeleteInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (DeleteInstances) super.setPrettyPrint(prettyPrint); } @Override public DeleteInstances setQuotaUser(java.lang.String quotaUser) { return (DeleteInstances) super.setQuotaUser(quotaUser); } @Override public DeleteInstances setUploadType(java.lang.String uploadType) { return (DeleteInstances) super.setUploadType(uploadType); } @Override public DeleteInstances setUploadProtocol(java.lang.String uploadProtocol) { return (DeleteInstances) super.setUploadProtocol(uploadProtocol); } @Override public DeleteInstances setUserIp(java.lang.String userIp) { return (DeleteInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public DeleteInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public DeleteInstances setRegion(java.lang.String region) { this.region = region; return this; } /** Name of the managed instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** Name of the managed instance group. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** Name of the managed instance group. */ public DeleteInstances setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public DeleteInstances setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public DeleteInstances set(String parameterName, Object value) { return (DeleteInstances) super.set(parameterName, value); } } /** * Deletes selected per-instance configurations for the managed instance group. * * Create a request for the method "regionInstanceGroupManagers.deletePerInstanceConfigs". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link DeletePerInstanceConfigs#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request, should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagerDeleteInstanceConfigReq} * @return the request */ public DeletePerInstanceConfigs deletePerInstanceConfigs(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagerDeleteInstanceConfigReq content) throws java.io.IOException { DeletePerInstanceConfigs result = new DeletePerInstanceConfigs(project, region, instanceGroupManager, content); initialize(result); return result; } public class DeletePerInstanceConfigs extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Deletes selected per-instance configurations for the managed instance group. * * Create a request for the method "regionInstanceGroupManagers.deletePerInstanceConfigs". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link DeletePerInstanceConfigs#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request, should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagerDeleteInstanceConfigReq} * @since 1.13 */ protected DeletePerInstanceConfigs(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagerDeleteInstanceConfigReq content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public DeletePerInstanceConfigs set$Xgafv(java.lang.String $Xgafv) { return (DeletePerInstanceConfigs) super.set$Xgafv($Xgafv); } @Override public DeletePerInstanceConfigs setAccessToken(java.lang.String accessToken) { return (DeletePerInstanceConfigs) super.setAccessToken(accessToken); } @Override public DeletePerInstanceConfigs setAlt(java.lang.String alt) { return (DeletePerInstanceConfigs) super.setAlt(alt); } @Override public DeletePerInstanceConfigs setCallback(java.lang.String callback) { return (DeletePerInstanceConfigs) super.setCallback(callback); } @Override public DeletePerInstanceConfigs setFields(java.lang.String fields) { return (DeletePerInstanceConfigs) super.setFields(fields); } @Override public DeletePerInstanceConfigs setKey(java.lang.String key) { return (DeletePerInstanceConfigs) super.setKey(key); } @Override public DeletePerInstanceConfigs setOauthToken(java.lang.String oauthToken) { return (DeletePerInstanceConfigs) super.setOauthToken(oauthToken); } @Override public DeletePerInstanceConfigs setPrettyPrint(java.lang.Boolean prettyPrint) { return (DeletePerInstanceConfigs) super.setPrettyPrint(prettyPrint); } @Override public DeletePerInstanceConfigs setQuotaUser(java.lang.String quotaUser) { return (DeletePerInstanceConfigs) super.setQuotaUser(quotaUser); } @Override public DeletePerInstanceConfigs setUploadType(java.lang.String uploadType) { return (DeletePerInstanceConfigs) super.setUploadType(uploadType); } @Override public DeletePerInstanceConfigs setUploadProtocol(java.lang.String uploadProtocol) { return (DeletePerInstanceConfigs) super.setUploadProtocol(uploadProtocol); } @Override public DeletePerInstanceConfigs setUserIp(java.lang.String userIp) { return (DeletePerInstanceConfigs) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public DeletePerInstanceConfigs setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request, should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request, should conform to RFC1035. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request, should conform to RFC1035. */ public DeletePerInstanceConfigs setRegion(java.lang.String region) { this.region = region; return this; } /** The name of the managed instance group. It should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. It should conform to RFC1035. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. It should conform to RFC1035. */ public DeletePerInstanceConfigs setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } @Override public DeletePerInstanceConfigs set(String parameterName, Object value) { return (DeletePerInstanceConfigs) super.set(parameterName, value); } } /** * Returns all of the details about the specified managed instance group. * * Create a request for the method "regionInstanceGroupManagers.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager Name of the managed instance group to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager) throws java.io.IOException { Get result = new Get(project, region, instanceGroupManager); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Returns all of the details about the specified managed instance group. * * Create a request for the method "regionInstanceGroupManagers.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager Name of the managed instance group to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceGroupManager.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { this.region = region; return this; } /** Name of the managed instance group to return. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** Name of the managed instance group to return. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** Name of the managed instance group to return. */ public Get setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a managed instance group using the information that you specify in the request. After the * group is created, instances in the group are created using the specified instance template. This * operation is marked as DONE when the group is created even if the instances in the group have not * yet been created. You must separately verify the status of the individual instances with the * listmanagedinstances method. A regional managed instance group can contain up to 2000 instances. * * Create a request for the method "regionInstanceGroupManagers.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManager} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.InstanceGroupManager content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a managed instance group using the information that you specify in the request. After * the group is created, instances in the group are created using the specified instance template. * This operation is marked as DONE when the group is created even if the instances in the group * have not yet been created. You must separately verify the status of the individual instances * with the listmanagedinstances method. A regional managed instance group can contain up to 2000 * instances. * * Create a request for the method "regionInstanceGroupManagers.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManager} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.InstanceGroupManager content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of managed instance groups that are contained within the specified region. * * Create a request for the method "regionInstanceGroupManagers.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of managed instance groups that are contained within the specified region. * * Create a request for the method "regionInstanceGroupManagers.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.RegionInstanceGroupManagerList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Lists all errors thrown by actions on instances for a given regional managed instance group. The * filter and orderBy query parameters are not supported. * * Create a request for the method "regionInstanceGroupManagers.listErrors". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListErrors#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. This should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It must be a string that meets the requirements in RFC1035, * or an unsigned long integer: must match regexp pattern: * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. * @return the request */ public ListErrors listErrors(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager) throws java.io.IOException { ListErrors result = new ListErrors(project, region, instanceGroupManager); initialize(result); return result; } public class ListErrors extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists all errors thrown by actions on instances for a given regional managed instance group. * The filter and orderBy query parameters are not supported. * * Create a request for the method "regionInstanceGroupManagers.listErrors". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListErrors#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. This should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It must be a string that meets the requirements in RFC1035, * or an unsigned long integer: must match regexp pattern: * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. * @since 1.13 */ protected ListErrors(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.RegionInstanceGroupManagersListErrorsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @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 ListErrors set$Xgafv(java.lang.String $Xgafv) { return (ListErrors) super.set$Xgafv($Xgafv); } @Override public ListErrors setAccessToken(java.lang.String accessToken) { return (ListErrors) super.setAccessToken(accessToken); } @Override public ListErrors setAlt(java.lang.String alt) { return (ListErrors) super.setAlt(alt); } @Override public ListErrors setCallback(java.lang.String callback) { return (ListErrors) super.setCallback(callback); } @Override public ListErrors setFields(java.lang.String fields) { return (ListErrors) super.setFields(fields); } @Override public ListErrors setKey(java.lang.String key) { return (ListErrors) super.setKey(key); } @Override public ListErrors setOauthToken(java.lang.String oauthToken) { return (ListErrors) super.setOauthToken(oauthToken); } @Override public ListErrors setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListErrors) super.setPrettyPrint(prettyPrint); } @Override public ListErrors setQuotaUser(java.lang.String quotaUser) { return (ListErrors) super.setQuotaUser(quotaUser); } @Override public ListErrors setUploadType(java.lang.String uploadType) { return (ListErrors) super.setUploadType(uploadType); } @Override public ListErrors setUploadProtocol(java.lang.String uploadProtocol) { return (ListErrors) super.setUploadProtocol(uploadProtocol); } @Override public ListErrors setUserIp(java.lang.String userIp) { return (ListErrors) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListErrors setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. This should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. This should conform to RFC1035. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. This should conform to RFC1035. */ public ListErrors setRegion(java.lang.String region) { this.region = region; return this; } /** * The name of the managed instance group. It must be a string that meets the requirements in * RFC1035, or an unsigned long integer: must match regexp pattern: * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** * The name of the managed instance group. It must be a string that meets the requirements in * RFC1035, or an unsigned long integer: must match regexp pattern: * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. */ public ListErrors setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListErrors setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListErrors setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListErrors setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListErrors setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListErrors setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListErrors set(String parameterName, Object value) { return (ListErrors) super.set(parameterName, value); } } /** * Lists the instances in the managed instance group and instances that are scheduled to be created. * The list includes any current actions that the group has scheduled for its instances. The orderBy * query parameter is not supported. The `pageToken` query parameter is supported only if the * group's `listManagedInstancesResults` field is set to `PAGINATED`. * * Create a request for the method "regionInstanceGroupManagers.listManagedInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListManagedInstances#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager The name of the managed instance group. * @return the request */ public ListManagedInstances listManagedInstances(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager) throws java.io.IOException { ListManagedInstances result = new ListManagedInstances(project, region, instanceGroupManager); initialize(result); return result; } public class ListManagedInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists the instances in the managed instance group and instances that are scheduled to be * created. The list includes any current actions that the group has scheduled for its instances. * The orderBy query parameter is not supported. The `pageToken` query parameter is supported only * if the group's `listManagedInstancesResults` field is set to `PAGINATED`. * * Create a request for the method "regionInstanceGroupManagers.listManagedInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListManagedInstances#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager The name of the managed instance group. * @since 1.13 */ protected ListManagedInstances(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.RegionInstanceGroupManagersListInstancesResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public ListManagedInstances set$Xgafv(java.lang.String $Xgafv) { return (ListManagedInstances) super.set$Xgafv($Xgafv); } @Override public ListManagedInstances setAccessToken(java.lang.String accessToken) { return (ListManagedInstances) super.setAccessToken(accessToken); } @Override public ListManagedInstances setAlt(java.lang.String alt) { return (ListManagedInstances) super.setAlt(alt); } @Override public ListManagedInstances setCallback(java.lang.String callback) { return (ListManagedInstances) super.setCallback(callback); } @Override public ListManagedInstances setFields(java.lang.String fields) { return (ListManagedInstances) super.setFields(fields); } @Override public ListManagedInstances setKey(java.lang.String key) { return (ListManagedInstances) super.setKey(key); } @Override public ListManagedInstances setOauthToken(java.lang.String oauthToken) { return (ListManagedInstances) super.setOauthToken(oauthToken); } @Override public ListManagedInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListManagedInstances) super.setPrettyPrint(prettyPrint); } @Override public ListManagedInstances setQuotaUser(java.lang.String quotaUser) { return (ListManagedInstances) super.setQuotaUser(quotaUser); } @Override public ListManagedInstances setUploadType(java.lang.String uploadType) { return (ListManagedInstances) super.setUploadType(uploadType); } @Override public ListManagedInstances setUploadProtocol(java.lang.String uploadProtocol) { return (ListManagedInstances) super.setUploadProtocol(uploadProtocol); } @Override public ListManagedInstances setUserIp(java.lang.String userIp) { return (ListManagedInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListManagedInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public ListManagedInstances setRegion(java.lang.String region) { this.region = region; return this; } /** The name of the managed instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. */ public ListManagedInstances setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListManagedInstances setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListManagedInstances setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListManagedInstances setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListManagedInstances setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListManagedInstances setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListManagedInstances set(String parameterName, Object value) { return (ListManagedInstances) super.set(parameterName, value); } } /** * Lists all of the per-instance configurations defined for the managed instance group. The orderBy * query parameter is not supported. * * Create a request for the method "regionInstanceGroupManagers.listPerInstanceConfigs". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListPerInstanceConfigs#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request, should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @return the request */ public ListPerInstanceConfigs listPerInstanceConfigs(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager) throws java.io.IOException { ListPerInstanceConfigs result = new ListPerInstanceConfigs(project, region, instanceGroupManager); initialize(result); return result; } public class ListPerInstanceConfigs extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists all of the per-instance configurations defined for the managed instance group. The * orderBy query parameter is not supported. * * Create a request for the method "regionInstanceGroupManagers.listPerInstanceConfigs". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListPerInstanceConfigs#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request, should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @since 1.13 */ protected ListPerInstanceConfigs(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.RegionInstanceGroupManagersListInstanceConfigsResp.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public ListPerInstanceConfigs set$Xgafv(java.lang.String $Xgafv) { return (ListPerInstanceConfigs) super.set$Xgafv($Xgafv); } @Override public ListPerInstanceConfigs setAccessToken(java.lang.String accessToken) { return (ListPerInstanceConfigs) super.setAccessToken(accessToken); } @Override public ListPerInstanceConfigs setAlt(java.lang.String alt) { return (ListPerInstanceConfigs) super.setAlt(alt); } @Override public ListPerInstanceConfigs setCallback(java.lang.String callback) { return (ListPerInstanceConfigs) super.setCallback(callback); } @Override public ListPerInstanceConfigs setFields(java.lang.String fields) { return (ListPerInstanceConfigs) super.setFields(fields); } @Override public ListPerInstanceConfigs setKey(java.lang.String key) { return (ListPerInstanceConfigs) super.setKey(key); } @Override public ListPerInstanceConfigs setOauthToken(java.lang.String oauthToken) { return (ListPerInstanceConfigs) super.setOauthToken(oauthToken); } @Override public ListPerInstanceConfigs setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListPerInstanceConfigs) super.setPrettyPrint(prettyPrint); } @Override public ListPerInstanceConfigs setQuotaUser(java.lang.String quotaUser) { return (ListPerInstanceConfigs) super.setQuotaUser(quotaUser); } @Override public ListPerInstanceConfigs setUploadType(java.lang.String uploadType) { return (ListPerInstanceConfigs) super.setUploadType(uploadType); } @Override public ListPerInstanceConfigs setUploadProtocol(java.lang.String uploadProtocol) { return (ListPerInstanceConfigs) super.setUploadProtocol(uploadProtocol); } @Override public ListPerInstanceConfigs setUserIp(java.lang.String userIp) { return (ListPerInstanceConfigs) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListPerInstanceConfigs setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request, should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request, should conform to RFC1035. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request, should conform to RFC1035. */ public ListPerInstanceConfigs setRegion(java.lang.String region) { this.region = region; return this; } /** The name of the managed instance group. It should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. It should conform to RFC1035. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. It should conform to RFC1035. */ public ListPerInstanceConfigs setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListPerInstanceConfigs setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListPerInstanceConfigs setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListPerInstanceConfigs setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListPerInstanceConfigs setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListPerInstanceConfigs setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListPerInstanceConfigs set(String parameterName, Object value) { return (ListPerInstanceConfigs) super.set(parameterName, value); } } /** * Updates a managed instance group using the information that you specify in the request. This * operation is marked as DONE when the group is patched even if the instances in the group are * still in the process of being patched. You must separately verify the status of the individual * instances with the listmanagedinstances method. This method supports PATCH semantics and uses the * JSON merge patch format and processing rules. If you update your group to specify a new template * or instance configuration, it's possible that your intended specification for each VM in the * group is different from the current state of that VM. To learn how to apply an updated * configuration to the VMs in a MIG, see Updating instances in a MIG. * * Create a request for the method "regionInstanceGroupManagers.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager The name of the instance group manager. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManager} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManager content) throws java.io.IOException { Patch result = new Patch(project, region, instanceGroupManager, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Updates a managed instance group using the information that you specify in the request. This * operation is marked as DONE when the group is patched even if the instances in the group are * still in the process of being patched. You must separately verify the status of the individual * instances with the listmanagedinstances method. This method supports PATCH semantics and uses * the JSON merge patch format and processing rules. If you update your group to specify a new * template or instance configuration, it's possible that your intended specification for each VM * in the group is different from the current state of that VM. To learn how to apply an updated * configuration to the VMs in a MIG, see Updating instances in a MIG. * * Create a request for the method "regionInstanceGroupManagers.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager The name of the instance group manager. * @param content the {@link com.google.api.services.compute.model.InstanceGroupManager} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.InstanceGroupManager content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Patch setRegion(java.lang.String region) { this.region = region; return this; } /** The name of the instance group manager. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the instance group manager. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the instance group manager. */ public Patch setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Inserts or patches per-instance configurations for the managed instance group. * perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. * * Create a request for the method "regionInstanceGroupManagers.patchPerInstanceConfigs". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link PatchPerInstanceConfigs#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request, should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagerPatchInstanceConfigReq} * @return the request */ public PatchPerInstanceConfigs patchPerInstanceConfigs(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagerPatchInstanceConfigReq content) throws java.io.IOException { PatchPerInstanceConfigs result = new PatchPerInstanceConfigs(project, region, instanceGroupManager, content); initialize(result); return result; } public class PatchPerInstanceConfigs extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Inserts or patches per-instance configurations for the managed instance group. * perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. * * Create a request for the method "regionInstanceGroupManagers.patchPerInstanceConfigs". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link PatchPerInstanceConfigs#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request, should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagerPatchInstanceConfigReq} * @since 1.13 */ protected PatchPerInstanceConfigs(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagerPatchInstanceConfigReq content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public PatchPerInstanceConfigs set$Xgafv(java.lang.String $Xgafv) { return (PatchPerInstanceConfigs) super.set$Xgafv($Xgafv); } @Override public PatchPerInstanceConfigs setAccessToken(java.lang.String accessToken) { return (PatchPerInstanceConfigs) super.setAccessToken(accessToken); } @Override public PatchPerInstanceConfigs setAlt(java.lang.String alt) { return (PatchPerInstanceConfigs) super.setAlt(alt); } @Override public PatchPerInstanceConfigs setCallback(java.lang.String callback) { return (PatchPerInstanceConfigs) super.setCallback(callback); } @Override public PatchPerInstanceConfigs setFields(java.lang.String fields) { return (PatchPerInstanceConfigs) super.setFields(fields); } @Override public PatchPerInstanceConfigs setKey(java.lang.String key) { return (PatchPerInstanceConfigs) super.setKey(key); } @Override public PatchPerInstanceConfigs setOauthToken(java.lang.String oauthToken) { return (PatchPerInstanceConfigs) super.setOauthToken(oauthToken); } @Override public PatchPerInstanceConfigs setPrettyPrint(java.lang.Boolean prettyPrint) { return (PatchPerInstanceConfigs) super.setPrettyPrint(prettyPrint); } @Override public PatchPerInstanceConfigs setQuotaUser(java.lang.String quotaUser) { return (PatchPerInstanceConfigs) super.setQuotaUser(quotaUser); } @Override public PatchPerInstanceConfigs setUploadType(java.lang.String uploadType) { return (PatchPerInstanceConfigs) super.setUploadType(uploadType); } @Override public PatchPerInstanceConfigs setUploadProtocol(java.lang.String uploadProtocol) { return (PatchPerInstanceConfigs) super.setUploadProtocol(uploadProtocol); } @Override public PatchPerInstanceConfigs setUserIp(java.lang.String userIp) { return (PatchPerInstanceConfigs) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public PatchPerInstanceConfigs setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request, should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request, should conform to RFC1035. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request, should conform to RFC1035. */ public PatchPerInstanceConfigs setRegion(java.lang.String region) { this.region = region; return this; } /** The name of the managed instance group. It should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. It should conform to RFC1035. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. It should conform to RFC1035. */ public PatchPerInstanceConfigs setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public PatchPerInstanceConfigs setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public PatchPerInstanceConfigs set(String parameterName, Object value) { return (PatchPerInstanceConfigs) super.set(parameterName, value); } } /** * Flags the specified VM instances in the managed instance group to be immediately recreated. Each * instance is recreated using the group's current configuration. This operation is marked as DONE * when the flag is set even if the instances have not yet been recreated. You must separately * verify the status of each instance by checking its currentAction field; for more information, see * Checking the status of managed instances. If the group is part of a backend service that has * enabled connection draining, it can take up to 60 seconds after the connection draining duration * has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 * instances with this method per request. * * Create a request for the method "regionInstanceGroupManagers.recreateInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RecreateInstances#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager Name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagersRecreateRequest} * @return the request */ public RecreateInstances recreateInstances(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagersRecreateRequest content) throws java.io.IOException { RecreateInstances result = new RecreateInstances(project, region, instanceGroupManager, content); initialize(result); return result; } public class RecreateInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Flags the specified VM instances in the managed instance group to be immediately recreated. * Each instance is recreated using the group's current configuration. This operation is marked as * DONE when the flag is set even if the instances have not yet been recreated. You must * separately verify the status of each instance by checking its currentAction field; for more * information, see Checking the status of managed instances. If the group is part of a backend * service that has enabled connection draining, it can take up to 60 seconds after the connection * draining duration has elapsed before the VM instance is removed or deleted. You can specify a * maximum of 1000 instances with this method per request. * * Create a request for the method "regionInstanceGroupManagers.recreateInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RecreateInstances#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager Name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagersRecreateRequest} * @since 1.13 */ protected RecreateInstances(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagersRecreateRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public RecreateInstances set$Xgafv(java.lang.String $Xgafv) { return (RecreateInstances) super.set$Xgafv($Xgafv); } @Override public RecreateInstances setAccessToken(java.lang.String accessToken) { return (RecreateInstances) super.setAccessToken(accessToken); } @Override public RecreateInstances setAlt(java.lang.String alt) { return (RecreateInstances) super.setAlt(alt); } @Override public RecreateInstances setCallback(java.lang.String callback) { return (RecreateInstances) super.setCallback(callback); } @Override public RecreateInstances setFields(java.lang.String fields) { return (RecreateInstances) super.setFields(fields); } @Override public RecreateInstances setKey(java.lang.String key) { return (RecreateInstances) super.setKey(key); } @Override public RecreateInstances setOauthToken(java.lang.String oauthToken) { return (RecreateInstances) super.setOauthToken(oauthToken); } @Override public RecreateInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (RecreateInstances) super.setPrettyPrint(prettyPrint); } @Override public RecreateInstances setQuotaUser(java.lang.String quotaUser) { return (RecreateInstances) super.setQuotaUser(quotaUser); } @Override public RecreateInstances setUploadType(java.lang.String uploadType) { return (RecreateInstances) super.setUploadType(uploadType); } @Override public RecreateInstances setUploadProtocol(java.lang.String uploadProtocol) { return (RecreateInstances) super.setUploadProtocol(uploadProtocol); } @Override public RecreateInstances setUserIp(java.lang.String userIp) { return (RecreateInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public RecreateInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public RecreateInstances setRegion(java.lang.String region) { this.region = region; return this; } /** Name of the managed instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** Name of the managed instance group. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** Name of the managed instance group. */ public RecreateInstances setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public RecreateInstances setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public RecreateInstances set(String parameterName, Object value) { return (RecreateInstances) super.set(parameterName, value); } } /** * Changes the intended size of the managed instance group. If you increase the size, the group * creates new instances using the current instance template. If you decrease the size, the group * deletes one or more instances. The resize operation is marked DONE if the resize request is * successful. The underlying actions take additional time. You must separately verify the status of * the creating or deleting actions with the listmanagedinstances method. If the group is part of a * backend service that has enabled connection draining, it can take up to 60 seconds after the * connection draining duration has elapsed before the VM instance is removed or deleted. * * Create a request for the method "regionInstanceGroupManagers.resize". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Resize#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager Name of the managed instance group. * @param size Number of instances that should exist in this instance group manager. [minimum: 0] * @return the request */ public Resize resize(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, java.lang.Integer size) throws java.io.IOException { Resize result = new Resize(project, region, instanceGroupManager, size); initialize(result); return result; } public class Resize extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Changes the intended size of the managed instance group. If you increase the size, the group * creates new instances using the current instance template. If you decrease the size, the group * deletes one or more instances. The resize operation is marked DONE if the resize request is * successful. The underlying actions take additional time. You must separately verify the status * of the creating or deleting actions with the listmanagedinstances method. If the group is part * of a backend service that has enabled connection draining, it can take up to 60 seconds after * the connection draining duration has elapsed before the VM instance is removed or deleted. * * Create a request for the method "regionInstanceGroupManagers.resize". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Resize#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager Name of the managed instance group. * @param size Number of instances that should exist in this instance group manager. [minimum: 0] * @since 1.13 */ protected Resize(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, java.lang.Integer size) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); this.size = com.google.api.client.util.Preconditions.checkNotNull(size, "Required parameter size must be specified."); } @Override public Resize set$Xgafv(java.lang.String $Xgafv) { return (Resize) super.set$Xgafv($Xgafv); } @Override public Resize setAccessToken(java.lang.String accessToken) { return (Resize) super.setAccessToken(accessToken); } @Override public Resize setAlt(java.lang.String alt) { return (Resize) super.setAlt(alt); } @Override public Resize setCallback(java.lang.String callback) { return (Resize) super.setCallback(callback); } @Override public Resize setFields(java.lang.String fields) { return (Resize) super.setFields(fields); } @Override public Resize setKey(java.lang.String key) { return (Resize) super.setKey(key); } @Override public Resize setOauthToken(java.lang.String oauthToken) { return (Resize) super.setOauthToken(oauthToken); } @Override public Resize setPrettyPrint(java.lang.Boolean prettyPrint) { return (Resize) super.setPrettyPrint(prettyPrint); } @Override public Resize setQuotaUser(java.lang.String quotaUser) { return (Resize) super.setQuotaUser(quotaUser); } @Override public Resize setUploadType(java.lang.String uploadType) { return (Resize) super.setUploadType(uploadType); } @Override public Resize setUploadProtocol(java.lang.String uploadProtocol) { return (Resize) super.setUploadProtocol(uploadProtocol); } @Override public Resize setUserIp(java.lang.String userIp) { return (Resize) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Resize setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Resize setRegion(java.lang.String region) { this.region = region; return this; } /** Name of the managed instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** Name of the managed instance group. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** Name of the managed instance group. */ public Resize setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** Number of instances that should exist in this instance group manager. */ @com.google.api.client.util.Key private java.lang.Integer size; /** Number of instances that should exist in this instance group manager. [minimum: 0] */ public java.lang.Integer getSize() { return size; } /** Number of instances that should exist in this instance group manager. */ public Resize setSize(java.lang.Integer size) { this.size = size; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Resize setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Resize set(String parameterName, Object value) { return (Resize) super.set(parameterName, value); } } /** * Sets the instance template to use when creating new instances or recreating instances in this * group. Existing instances are not affected. * * Create a request for the method "regionInstanceGroupManagers.setInstanceTemplate". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetInstanceTemplate#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager The name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagersSetTemplateRequest} * @return the request */ public SetInstanceTemplate setInstanceTemplate(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagersSetTemplateRequest content) throws java.io.IOException { SetInstanceTemplate result = new SetInstanceTemplate(project, region, instanceGroupManager, content); initialize(result); return result; } public class SetInstanceTemplate extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Sets the instance template to use when creating new instances or recreating instances in this * group. Existing instances are not affected. * * Create a request for the method "regionInstanceGroupManagers.setInstanceTemplate". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetInstanceTemplate#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager The name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagersSetTemplateRequest} * @since 1.13 */ protected SetInstanceTemplate(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagersSetTemplateRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public SetInstanceTemplate set$Xgafv(java.lang.String $Xgafv) { return (SetInstanceTemplate) super.set$Xgafv($Xgafv); } @Override public SetInstanceTemplate setAccessToken(java.lang.String accessToken) { return (SetInstanceTemplate) super.setAccessToken(accessToken); } @Override public SetInstanceTemplate setAlt(java.lang.String alt) { return (SetInstanceTemplate) super.setAlt(alt); } @Override public SetInstanceTemplate setCallback(java.lang.String callback) { return (SetInstanceTemplate) super.setCallback(callback); } @Override public SetInstanceTemplate setFields(java.lang.String fields) { return (SetInstanceTemplate) super.setFields(fields); } @Override public SetInstanceTemplate setKey(java.lang.String key) { return (SetInstanceTemplate) super.setKey(key); } @Override public SetInstanceTemplate setOauthToken(java.lang.String oauthToken) { return (SetInstanceTemplate) super.setOauthToken(oauthToken); } @Override public SetInstanceTemplate setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetInstanceTemplate) super.setPrettyPrint(prettyPrint); } @Override public SetInstanceTemplate setQuotaUser(java.lang.String quotaUser) { return (SetInstanceTemplate) super.setQuotaUser(quotaUser); } @Override public SetInstanceTemplate setUploadType(java.lang.String uploadType) { return (SetInstanceTemplate) super.setUploadType(uploadType); } @Override public SetInstanceTemplate setUploadProtocol(java.lang.String uploadProtocol) { return (SetInstanceTemplate) super.setUploadProtocol(uploadProtocol); } @Override public SetInstanceTemplate setUserIp(java.lang.String userIp) { return (SetInstanceTemplate) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetInstanceTemplate setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public SetInstanceTemplate setRegion(java.lang.String region) { this.region = region; return this; } /** The name of the managed instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. */ public SetInstanceTemplate setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetInstanceTemplate setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetInstanceTemplate set(String parameterName, Object value) { return (SetInstanceTemplate) super.set(parameterName, value); } } /** * Modifies the target pools to which all new instances in this group are assigned. Existing * instances in the group are not affected. * * Create a request for the method "regionInstanceGroupManagers.setTargetPools". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetTargetPools#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager Name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagersSetTargetPoolsRequest} * @return the request */ public SetTargetPools setTargetPools(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagersSetTargetPoolsRequest content) throws java.io.IOException { SetTargetPools result = new SetTargetPools(project, region, instanceGroupManager, content); initialize(result); return result; } public class SetTargetPools extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Modifies the target pools to which all new instances in this group are assigned. Existing * instances in the group are not affected. * * Create a request for the method "regionInstanceGroupManagers.setTargetPools". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetTargetPools#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroupManager Name of the managed instance group. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagersSetTargetPoolsRequest} * @since 1.13 */ protected SetTargetPools(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagersSetTargetPoolsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public SetTargetPools set$Xgafv(java.lang.String $Xgafv) { return (SetTargetPools) super.set$Xgafv($Xgafv); } @Override public SetTargetPools setAccessToken(java.lang.String accessToken) { return (SetTargetPools) super.setAccessToken(accessToken); } @Override public SetTargetPools setAlt(java.lang.String alt) { return (SetTargetPools) super.setAlt(alt); } @Override public SetTargetPools setCallback(java.lang.String callback) { return (SetTargetPools) super.setCallback(callback); } @Override public SetTargetPools setFields(java.lang.String fields) { return (SetTargetPools) super.setFields(fields); } @Override public SetTargetPools setKey(java.lang.String key) { return (SetTargetPools) super.setKey(key); } @Override public SetTargetPools setOauthToken(java.lang.String oauthToken) { return (SetTargetPools) super.setOauthToken(oauthToken); } @Override public SetTargetPools setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetTargetPools) super.setPrettyPrint(prettyPrint); } @Override public SetTargetPools setQuotaUser(java.lang.String quotaUser) { return (SetTargetPools) super.setQuotaUser(quotaUser); } @Override public SetTargetPools setUploadType(java.lang.String uploadType) { return (SetTargetPools) super.setUploadType(uploadType); } @Override public SetTargetPools setUploadProtocol(java.lang.String uploadProtocol) { return (SetTargetPools) super.setUploadProtocol(uploadProtocol); } @Override public SetTargetPools setUserIp(java.lang.String userIp) { return (SetTargetPools) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetTargetPools setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public SetTargetPools setRegion(java.lang.String region) { this.region = region; return this; } /** Name of the managed instance group. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** Name of the managed instance group. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** Name of the managed instance group. */ public SetTargetPools setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetTargetPools setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetTargetPools set(String parameterName, Object value) { return (SetTargetPools) super.set(parameterName, value); } } /** * Inserts or updates per-instance configurations for the managed instance group. * perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. * * Create a request for the method "regionInstanceGroupManagers.updatePerInstanceConfigs". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link UpdatePerInstanceConfigs#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request, should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagerUpdateInstanceConfigReq} * @return the request */ public UpdatePerInstanceConfigs updatePerInstanceConfigs(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagerUpdateInstanceConfigReq content) throws java.io.IOException { UpdatePerInstanceConfigs result = new UpdatePerInstanceConfigs(project, region, instanceGroupManager, content); initialize(result); return result; } public class UpdatePerInstanceConfigs extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Inserts or updates per-instance configurations for the managed instance group. * perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. * * Create a request for the method "regionInstanceGroupManagers.updatePerInstanceConfigs". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link UpdatePerInstanceConfigs#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request, should conform to RFC1035. * @param instanceGroupManager The name of the managed instance group. It should conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupManagerUpdateInstanceConfigReq} * @since 1.13 */ protected UpdatePerInstanceConfigs(java.lang.String project, java.lang.String region, java.lang.String instanceGroupManager, com.google.api.services.compute.model.RegionInstanceGroupManagerUpdateInstanceConfigReq content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroupManager = com.google.api.client.util.Preconditions.checkNotNull(instanceGroupManager, "Required parameter instanceGroupManager must be specified."); } @Override public UpdatePerInstanceConfigs set$Xgafv(java.lang.String $Xgafv) { return (UpdatePerInstanceConfigs) super.set$Xgafv($Xgafv); } @Override public UpdatePerInstanceConfigs setAccessToken(java.lang.String accessToken) { return (UpdatePerInstanceConfigs) super.setAccessToken(accessToken); } @Override public UpdatePerInstanceConfigs setAlt(java.lang.String alt) { return (UpdatePerInstanceConfigs) super.setAlt(alt); } @Override public UpdatePerInstanceConfigs setCallback(java.lang.String callback) { return (UpdatePerInstanceConfigs) super.setCallback(callback); } @Override public UpdatePerInstanceConfigs setFields(java.lang.String fields) { return (UpdatePerInstanceConfigs) super.setFields(fields); } @Override public UpdatePerInstanceConfigs setKey(java.lang.String key) { return (UpdatePerInstanceConfigs) super.setKey(key); } @Override public UpdatePerInstanceConfigs setOauthToken(java.lang.String oauthToken) { return (UpdatePerInstanceConfigs) super.setOauthToken(oauthToken); } @Override public UpdatePerInstanceConfigs setPrettyPrint(java.lang.Boolean prettyPrint) { return (UpdatePerInstanceConfigs) super.setPrettyPrint(prettyPrint); } @Override public UpdatePerInstanceConfigs setQuotaUser(java.lang.String quotaUser) { return (UpdatePerInstanceConfigs) super.setQuotaUser(quotaUser); } @Override public UpdatePerInstanceConfigs setUploadType(java.lang.String uploadType) { return (UpdatePerInstanceConfigs) super.setUploadType(uploadType); } @Override public UpdatePerInstanceConfigs setUploadProtocol(java.lang.String uploadProtocol) { return (UpdatePerInstanceConfigs) super.setUploadProtocol(uploadProtocol); } @Override public UpdatePerInstanceConfigs setUserIp(java.lang.String userIp) { return (UpdatePerInstanceConfigs) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public UpdatePerInstanceConfigs setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request, should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request, should conform to RFC1035. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request, should conform to RFC1035. */ public UpdatePerInstanceConfigs setRegion(java.lang.String region) { this.region = region; return this; } /** The name of the managed instance group. It should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String instanceGroupManager; /** The name of the managed instance group. It should conform to RFC1035. */ public java.lang.String getInstanceGroupManager() { return instanceGroupManager; } /** The name of the managed instance group. It should conform to RFC1035. */ public UpdatePerInstanceConfigs setInstanceGroupManager(java.lang.String instanceGroupManager) { this.instanceGroupManager = instanceGroupManager; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public UpdatePerInstanceConfigs setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public UpdatePerInstanceConfigs set(String parameterName, Object value) { return (UpdatePerInstanceConfigs) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionInstanceGroups collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionInstanceGroups.List request = compute.regionInstanceGroups().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionInstanceGroups regionInstanceGroups() { return new RegionInstanceGroups(); } /** * The "regionInstanceGroups" collection of methods. */ public class RegionInstanceGroups { /** * Returns the specified instance group resource. * * Create a request for the method "regionInstanceGroups.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroup Name of the instance group resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String instanceGroup) throws java.io.IOException { Get result = new Get(project, region, instanceGroup); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Returns the specified instance group resource. * * Create a request for the method "regionInstanceGroups.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroup Name of the instance group resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String instanceGroup) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceGroup.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroup = com.google.api.client.util.Preconditions.checkNotNull(instanceGroup, "Required parameter instanceGroup must be specified."); } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { this.region = region; return this; } /** Name of the instance group resource to return. */ @com.google.api.client.util.Key private java.lang.String instanceGroup; /** Name of the instance group resource to return. */ public java.lang.String getInstanceGroup() { return instanceGroup; } /** Name of the instance group resource to return. */ public Get setInstanceGroup(java.lang.String instanceGroup) { this.instanceGroup = instanceGroup; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves the list of instance group resources contained within the specified region. * * Create a request for the method "regionInstanceGroups.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroups"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of instance group resources contained within the specified region. * * Create a request for the method "regionInstanceGroups.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.RegionInstanceGroupList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Lists the instances in the specified instance group and displays information about the named * ports. Depending on the specified options, this method can list all instances or only the * instances that are running. The orderBy query parameter is not supported. * * Create a request for the method "regionInstanceGroups.listInstances". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListInstances#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroup Name of the regional instance group for which we want to list the instances. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupsListInstancesRequest} * @return the request */ public ListInstances listInstances(java.lang.String project, java.lang.String region, java.lang.String instanceGroup, com.google.api.services.compute.model.RegionInstanceGroupsListInstancesRequest content) throws java.io.IOException { ListInstances result = new ListInstances(project, region, instanceGroup, content); initialize(result); return result; } public class ListInstances extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists the instances in the specified instance group and displays information about the named * ports. Depending on the specified options, this method can list all instances or only the * instances that are running. The orderBy query parameter is not supported. * * Create a request for the method "regionInstanceGroups.listInstances". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListInstances#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroup Name of the regional instance group for which we want to list the instances. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupsListInstancesRequest} * @since 1.13 */ protected ListInstances(java.lang.String project, java.lang.String region, java.lang.String instanceGroup, com.google.api.services.compute.model.RegionInstanceGroupsListInstancesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.RegionInstanceGroupsListInstances.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroup = com.google.api.client.util.Preconditions.checkNotNull(instanceGroup, "Required parameter instanceGroup must be specified."); } @Override public ListInstances set$Xgafv(java.lang.String $Xgafv) { return (ListInstances) super.set$Xgafv($Xgafv); } @Override public ListInstances setAccessToken(java.lang.String accessToken) { return (ListInstances) super.setAccessToken(accessToken); } @Override public ListInstances setAlt(java.lang.String alt) { return (ListInstances) super.setAlt(alt); } @Override public ListInstances setCallback(java.lang.String callback) { return (ListInstances) super.setCallback(callback); } @Override public ListInstances setFields(java.lang.String fields) { return (ListInstances) super.setFields(fields); } @Override public ListInstances setKey(java.lang.String key) { return (ListInstances) super.setKey(key); } @Override public ListInstances setOauthToken(java.lang.String oauthToken) { return (ListInstances) super.setOauthToken(oauthToken); } @Override public ListInstances setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListInstances) super.setPrettyPrint(prettyPrint); } @Override public ListInstances setQuotaUser(java.lang.String quotaUser) { return (ListInstances) super.setQuotaUser(quotaUser); } @Override public ListInstances setUploadType(java.lang.String uploadType) { return (ListInstances) super.setUploadType(uploadType); } @Override public ListInstances setUploadProtocol(java.lang.String uploadProtocol) { return (ListInstances) super.setUploadProtocol(uploadProtocol); } @Override public ListInstances setUserIp(java.lang.String userIp) { return (ListInstances) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListInstances setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public ListInstances setRegion(java.lang.String region) { this.region = region; return this; } /** Name of the regional instance group for which we want to list the instances. */ @com.google.api.client.util.Key private java.lang.String instanceGroup; /** Name of the regional instance group for which we want to list the instances. */ public java.lang.String getInstanceGroup() { return instanceGroup; } /** Name of the regional instance group for which we want to list the instances. */ public ListInstances setInstanceGroup(java.lang.String instanceGroup) { this.instanceGroup = instanceGroup; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListInstances setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListInstances setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListInstances setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListInstances setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListInstances setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListInstances set(String parameterName, Object value) { return (ListInstances) super.set(parameterName, value); } } /** * Sets the named ports for the specified regional instance group. * * Create a request for the method "regionInstanceGroups.setNamedPorts". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetNamedPorts#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroup The name of the regional instance group where the named ports are updated. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupsSetNamedPortsRequest} * @return the request */ public SetNamedPorts setNamedPorts(java.lang.String project, java.lang.String region, java.lang.String instanceGroup, com.google.api.services.compute.model.RegionInstanceGroupsSetNamedPortsRequest content) throws java.io.IOException { SetNamedPorts result = new SetNamedPorts(project, region, instanceGroup, content); initialize(result); return result; } public class SetNamedPorts extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Sets the named ports for the specified regional instance group. * * Create a request for the method "regionInstanceGroups.setNamedPorts". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetNamedPorts#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param instanceGroup The name of the regional instance group where the named ports are updated. * @param content the {@link com.google.api.services.compute.model.RegionInstanceGroupsSetNamedPortsRequest} * @since 1.13 */ protected SetNamedPorts(java.lang.String project, java.lang.String region, java.lang.String instanceGroup, com.google.api.services.compute.model.RegionInstanceGroupsSetNamedPortsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.instanceGroup = com.google.api.client.util.Preconditions.checkNotNull(instanceGroup, "Required parameter instanceGroup must be specified."); } @Override public SetNamedPorts set$Xgafv(java.lang.String $Xgafv) { return (SetNamedPorts) super.set$Xgafv($Xgafv); } @Override public SetNamedPorts setAccessToken(java.lang.String accessToken) { return (SetNamedPorts) super.setAccessToken(accessToken); } @Override public SetNamedPorts setAlt(java.lang.String alt) { return (SetNamedPorts) super.setAlt(alt); } @Override public SetNamedPorts setCallback(java.lang.String callback) { return (SetNamedPorts) super.setCallback(callback); } @Override public SetNamedPorts setFields(java.lang.String fields) { return (SetNamedPorts) super.setFields(fields); } @Override public SetNamedPorts setKey(java.lang.String key) { return (SetNamedPorts) super.setKey(key); } @Override public SetNamedPorts setOauthToken(java.lang.String oauthToken) { return (SetNamedPorts) super.setOauthToken(oauthToken); } @Override public SetNamedPorts setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetNamedPorts) super.setPrettyPrint(prettyPrint); } @Override public SetNamedPorts setQuotaUser(java.lang.String quotaUser) { return (SetNamedPorts) super.setQuotaUser(quotaUser); } @Override public SetNamedPorts setUploadType(java.lang.String uploadType) { return (SetNamedPorts) super.setUploadType(uploadType); } @Override public SetNamedPorts setUploadProtocol(java.lang.String uploadProtocol) { return (SetNamedPorts) super.setUploadProtocol(uploadProtocol); } @Override public SetNamedPorts setUserIp(java.lang.String userIp) { return (SetNamedPorts) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetNamedPorts setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public SetNamedPorts setRegion(java.lang.String region) { this.region = region; return this; } /** The name of the regional instance group where the named ports are updated. */ @com.google.api.client.util.Key private java.lang.String instanceGroup; /** The name of the regional instance group where the named ports are updated. */ public java.lang.String getInstanceGroup() { return instanceGroup; } /** The name of the regional instance group where the named ports are updated. */ public SetNamedPorts setInstanceGroup(java.lang.String instanceGroup) { this.instanceGroup = instanceGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetNamedPorts setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetNamedPorts set(String parameterName, Object value) { return (SetNamedPorts) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionInstanceTemplates collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionInstanceTemplates.List request = compute.regionInstanceTemplates().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionInstanceTemplates regionInstanceTemplates() { return new RegionInstanceTemplates(); } /** * The "regionInstanceTemplates" collection of methods. */ public class RegionInstanceTemplates { /** * Deletes the specified instance template. Deleting an instance template is permanent and cannot be * undone. * * Create a request for the method "regionInstanceTemplates.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param instanceTemplate The name of the instance template to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String instanceTemplate) throws java.io.IOException { Delete result = new Delete(project, region, instanceTemplate); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_TEMPLATE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified instance template. Deleting an instance template is permanent and cannot * be undone. * * Create a request for the method "regionInstanceTemplates.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region The name of the region for this request. * @param instanceTemplate The name of the instance template to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String instanceTemplate) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instanceTemplate = com.google.api.client.util.Preconditions.checkNotNull(instanceTemplate, "Required parameter instanceTemplate must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_TEMPLATE_PATTERN.matcher(instanceTemplate).matches(), "Parameter instanceTemplate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** The name of the instance template to delete. */ @com.google.api.client.util.Key private java.lang.String instanceTemplate; /** The name of the instance template to delete. */ public java.lang.String getInstanceTemplate() { return instanceTemplate; } /** The name of the instance template to delete. */ public Delete setInstanceTemplate(java.lang.String instanceTemplate) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_TEMPLATE_PATTERN.matcher(instanceTemplate).matches(), "Parameter instanceTemplate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instanceTemplate = instanceTemplate; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified instance template. * * Create a request for the method "regionInstanceTemplates.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param instanceTemplate The name of the instance template. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String instanceTemplate) throws java.io.IOException { Get result = new Get(project, region, instanceTemplate); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANCE_TEMPLATE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified instance template. * * Create a request for the method "regionInstanceTemplates.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region The name of the region for this request. * @param instanceTemplate The name of the instance template. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String instanceTemplate) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceTemplate.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instanceTemplate = com.google.api.client.util.Preconditions.checkNotNull(instanceTemplate, "Required parameter instanceTemplate must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_TEMPLATE_PATTERN.matcher(instanceTemplate).matches(), "Parameter instanceTemplate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** The name of the instance template. */ @com.google.api.client.util.Key private java.lang.String instanceTemplate; /** The name of the instance template. */ public java.lang.String getInstanceTemplate() { return instanceTemplate; } /** The name of the instance template. */ public Get setInstanceTemplate(java.lang.String instanceTemplate) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANCE_TEMPLATE_PATTERN.matcher(instanceTemplate).matches(), "Parameter instanceTemplate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instanceTemplate = instanceTemplate; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates an instance template in the specified project and region using the global instance * template whose URL is included in the request. * * Create a request for the method "regionInstanceTemplates.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param content the {@link com.google.api.services.compute.model.InstanceTemplate} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.InstanceTemplate content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceTemplates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates an instance template in the specified project and region using the global instance * template whose URL is included in the request. * * Create a request for the method "regionInstanceTemplates.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param content the {@link com.google.api.services.compute.model.InstanceTemplate} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.InstanceTemplate content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of instance templates that are contained within the specified project and * region. * * Create a request for the method "regionInstanceTemplates.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the regions for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instanceTemplates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of instance templates that are contained within the specified project and * region. * * Create a request for the method "regionInstanceTemplates.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region The name of the regions for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstanceTemplateList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the regions for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the regions for this request. */ public java.lang.String getRegion() { return region; } /** The name of the regions for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionInstances collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionInstances.List request = compute.regionInstances().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionInstances regionInstances() { return new RegionInstances(); } /** * The "regionInstances" collection of methods. */ public class RegionInstances { /** * Creates multiple instances in a given region. Count specifies the number of instances to create. * * Create a request for the method "regionInstances.bulkInsert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link BulkInsert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param content the {@link com.google.api.services.compute.model.BulkInsertInstanceResource} * @return the request */ public BulkInsert bulkInsert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.BulkInsertInstanceResource content) throws java.io.IOException { BulkInsert result = new BulkInsert(project, region, content); initialize(result); return result; } public class BulkInsert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instances/bulkInsert"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates multiple instances in a given region. Count specifies the number of instances to * create. * * Create a request for the method "regionInstances.bulkInsert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link BulkInsert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param content the {@link com.google.api.services.compute.model.BulkInsertInstanceResource} * @since 1.13 */ protected BulkInsert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.BulkInsertInstanceResource content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public BulkInsert set$Xgafv(java.lang.String $Xgafv) { return (BulkInsert) super.set$Xgafv($Xgafv); } @Override public BulkInsert setAccessToken(java.lang.String accessToken) { return (BulkInsert) super.setAccessToken(accessToken); } @Override public BulkInsert setAlt(java.lang.String alt) { return (BulkInsert) super.setAlt(alt); } @Override public BulkInsert setCallback(java.lang.String callback) { return (BulkInsert) super.setCallback(callback); } @Override public BulkInsert setFields(java.lang.String fields) { return (BulkInsert) super.setFields(fields); } @Override public BulkInsert setKey(java.lang.String key) { return (BulkInsert) super.setKey(key); } @Override public BulkInsert setOauthToken(java.lang.String oauthToken) { return (BulkInsert) super.setOauthToken(oauthToken); } @Override public BulkInsert setPrettyPrint(java.lang.Boolean prettyPrint) { return (BulkInsert) super.setPrettyPrint(prettyPrint); } @Override public BulkInsert setQuotaUser(java.lang.String quotaUser) { return (BulkInsert) super.setQuotaUser(quotaUser); } @Override public BulkInsert setUploadType(java.lang.String uploadType) { return (BulkInsert) super.setUploadType(uploadType); } @Override public BulkInsert setUploadProtocol(java.lang.String uploadProtocol) { return (BulkInsert) super.setUploadProtocol(uploadProtocol); } @Override public BulkInsert setUserIp(java.lang.String userIp) { return (BulkInsert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public BulkInsert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public BulkInsert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public BulkInsert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public BulkInsert set(String parameterName, Object value) { return (BulkInsert) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionInstantSnapshots collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionInstantSnapshots.List request = compute.regionInstantSnapshots().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionInstantSnapshots regionInstantSnapshots() { return new RegionInstantSnapshots(); } /** * The "regionInstantSnapshots" collection of methods. */ public class RegionInstantSnapshots { /** * Deletes the specified InstantSnapshot resource. Keep in mind that deleting a single * instantSnapshot might not necessarily delete all the data on that instantSnapshot. If any data on * the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the * data will be moved to the next corresponding instantSnapshot. For more information, see Deleting * instantSnapshots. * * Create a request for the method "regionInstantSnapshots.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param instantSnapshot Name of the InstantSnapshot resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String instantSnapshot) throws java.io.IOException { Delete result = new Delete(project, region, instantSnapshot); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANT_SNAPSHOT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified InstantSnapshot resource. Keep in mind that deleting a single * instantSnapshot might not necessarily delete all the data on that instantSnapshot. If any data * on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, * the data will be moved to the next corresponding instantSnapshot. For more information, see * Deleting instantSnapshots. * * Create a request for the method "regionInstantSnapshots.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region The name of the region for this request. * @param instantSnapshot Name of the InstantSnapshot resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String instantSnapshot) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instantSnapshot = com.google.api.client.util.Preconditions.checkNotNull(instantSnapshot, "Required parameter instantSnapshot must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANT_SNAPSHOT_PATTERN.matcher(instantSnapshot).matches(), "Parameter instantSnapshot must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the InstantSnapshot resource to delete. */ @com.google.api.client.util.Key private java.lang.String instantSnapshot; /** Name of the InstantSnapshot resource to delete. */ public java.lang.String getInstantSnapshot() { return instantSnapshot; } /** Name of the InstantSnapshot resource to delete. */ public Delete setInstantSnapshot(java.lang.String instantSnapshot) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANT_SNAPSHOT_PATTERN.matcher(instantSnapshot).matches(), "Parameter instantSnapshot must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instantSnapshot = instantSnapshot; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified InstantSnapshot resource in the specified region. * * Create a request for the method "regionInstantSnapshots.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param instantSnapshot Name of the InstantSnapshot resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String instantSnapshot) throws java.io.IOException { Get result = new Get(project, region, instantSnapshot); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern INSTANT_SNAPSHOT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified InstantSnapshot resource in the specified region. * * Create a request for the method "regionInstantSnapshots.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region The name of the region for this request. * @param instantSnapshot Name of the InstantSnapshot resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String instantSnapshot) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstantSnapshot.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.instantSnapshot = com.google.api.client.util.Preconditions.checkNotNull(instantSnapshot, "Required parameter instantSnapshot must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANT_SNAPSHOT_PATTERN.matcher(instantSnapshot).matches(), "Parameter instantSnapshot must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the InstantSnapshot resource to return. */ @com.google.api.client.util.Key private java.lang.String instantSnapshot; /** Name of the InstantSnapshot resource to return. */ public java.lang.String getInstantSnapshot() { return instantSnapshot; } /** Name of the InstantSnapshot resource to return. */ public Get setInstantSnapshot(java.lang.String instantSnapshot) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(INSTANT_SNAPSHOT_PATTERN.matcher(instantSnapshot).matches(), "Parameter instantSnapshot must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.instantSnapshot = instantSnapshot; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "regionInstantSnapshots.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, region, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instantSnapshots/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "regionInstantSnapshots.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public GetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates an instant snapshot in the specified region. * * Create a request for the method "regionInstantSnapshots.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.InstantSnapshot} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.InstantSnapshot content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instantSnapshots"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates an instant snapshot in the specified region. * * Create a request for the method "regionInstantSnapshots.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.InstantSnapshot} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.InstantSnapshot content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of InstantSnapshot resources contained within the specified region. * * Create a request for the method "regionInstantSnapshots.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instantSnapshots"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves the list of InstantSnapshot resources contained within the specified region. * * Create a request for the method "regionInstantSnapshots.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region The name of the region for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.InstantSnapshotList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "regionInstantSnapshots.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, region, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instantSnapshots/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "regionInstantSnapshots.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public SetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Sets the labels on a instantSnapshot in the given region. To learn more about labels, read the * Labeling Resources documentation. * * Create a request for the method "regionInstantSnapshots.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, region, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on a instantSnapshot in the given region. To learn more about labels, read the * Labeling Resources documentation. * * Create a request for the method "regionInstantSnapshots.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The region for this request. */ public java.lang.String getRegion() { return region; } /** The region for this request. */ public SetLabels setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetLabels setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "regionInstantSnapshots.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, region, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/instantSnapshots/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "regionInstantSnapshots.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public TestIamPermissions setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionNetworkEndpointGroups collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionNetworkEndpointGroups.List request = compute.regionNetworkEndpointGroups().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionNetworkEndpointGroups regionNetworkEndpointGroups() { return new RegionNetworkEndpointGroups(); } /** * The "regionNetworkEndpointGroups" collection of methods. */ public class RegionNetworkEndpointGroups { /** * Attach a list of network endpoints to the specified network endpoint group. * * Create a request for the method "regionNetworkEndpointGroups.attachNetworkEndpoints". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AttachNetworkEndpoints#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region The name of the region where you want to create the network endpoint group. It should comply with * RFC1035. * @param networkEndpointGroup The name of the network endpoint group where you are attaching network endpoints to. It should * comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.RegionNetworkEndpointGroupsAttachEndpointsRequest} * @return the request */ public AttachNetworkEndpoints attachNetworkEndpoints(java.lang.String project, java.lang.String region, java.lang.String networkEndpointGroup, com.google.api.services.compute.model.RegionNetworkEndpointGroupsAttachEndpointsRequest content) throws java.io.IOException { AttachNetworkEndpoints result = new AttachNetworkEndpoints(project, region, networkEndpointGroup, content); initialize(result); return result; } public class AttachNetworkEndpoints extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Attach a list of network endpoints to the specified network endpoint group. * * Create a request for the method "regionNetworkEndpointGroups.attachNetworkEndpoints". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AttachNetworkEndpoints#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region where you want to create the network endpoint group. It should comply with * RFC1035. * @param networkEndpointGroup The name of the network endpoint group where you are attaching network endpoints to. It should * comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.RegionNetworkEndpointGroupsAttachEndpointsRequest} * @since 1.13 */ protected AttachNetworkEndpoints(java.lang.String project, java.lang.String region, java.lang.String networkEndpointGroup, com.google.api.services.compute.model.RegionNetworkEndpointGroupsAttachEndpointsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.networkEndpointGroup = com.google.api.client.util.Preconditions.checkNotNull(networkEndpointGroup, "Required parameter networkEndpointGroup must be specified."); } @Override public AttachNetworkEndpoints set$Xgafv(java.lang.String $Xgafv) { return (AttachNetworkEndpoints) super.set$Xgafv($Xgafv); } @Override public AttachNetworkEndpoints setAccessToken(java.lang.String accessToken) { return (AttachNetworkEndpoints) super.setAccessToken(accessToken); } @Override public AttachNetworkEndpoints setAlt(java.lang.String alt) { return (AttachNetworkEndpoints) super.setAlt(alt); } @Override public AttachNetworkEndpoints setCallback(java.lang.String callback) { return (AttachNetworkEndpoints) super.setCallback(callback); } @Override public AttachNetworkEndpoints setFields(java.lang.String fields) { return (AttachNetworkEndpoints) super.setFields(fields); } @Override public AttachNetworkEndpoints setKey(java.lang.String key) { return (AttachNetworkEndpoints) super.setKey(key); } @Override public AttachNetworkEndpoints setOauthToken(java.lang.String oauthToken) { return (AttachNetworkEndpoints) super.setOauthToken(oauthToken); } @Override public AttachNetworkEndpoints setPrettyPrint(java.lang.Boolean prettyPrint) { return (AttachNetworkEndpoints) super.setPrettyPrint(prettyPrint); } @Override public AttachNetworkEndpoints setQuotaUser(java.lang.String quotaUser) { return (AttachNetworkEndpoints) super.setQuotaUser(quotaUser); } @Override public AttachNetworkEndpoints setUploadType(java.lang.String uploadType) { return (AttachNetworkEndpoints) super.setUploadType(uploadType); } @Override public AttachNetworkEndpoints setUploadProtocol(java.lang.String uploadProtocol) { return (AttachNetworkEndpoints) super.setUploadProtocol(uploadProtocol); } @Override public AttachNetworkEndpoints setUserIp(java.lang.String userIp) { return (AttachNetworkEndpoints) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AttachNetworkEndpoints setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the region where you want to create the network endpoint group. It should * comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region where you want to create the network endpoint group. It should comply with RFC1035. */ public java.lang.String getRegion() { return region; } /** * The name of the region where you want to create the network endpoint group. It should * comply with RFC1035. */ public AttachNetworkEndpoints setRegion(java.lang.String region) { this.region = region; return this; } /** * The name of the network endpoint group where you are attaching network endpoints to. It * should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String networkEndpointGroup; /** The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035. */ public java.lang.String getNetworkEndpointGroup() { return networkEndpointGroup; } /** * The name of the network endpoint group where you are attaching network endpoints to. It * should comply with RFC1035. */ public AttachNetworkEndpoints setNetworkEndpointGroup(java.lang.String networkEndpointGroup) { this.networkEndpointGroup = networkEndpointGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AttachNetworkEndpoints setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AttachNetworkEndpoints set(String parameterName, Object value) { return (AttachNetworkEndpoints) super.set(parameterName, value); } } /** * Deletes the specified network endpoint group. Note that the NEG cannot be deleted if it is * configured as a backend of a backend service. * * Create a request for the method "regionNetworkEndpointGroups.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group to delete. It should comply with RFC1035. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String networkEndpointGroup) throws java.io.IOException { Delete result = new Delete(project, region, networkEndpointGroup); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Deletes the specified network endpoint group. Note that the NEG cannot be deleted if it is * configured as a backend of a backend service. * * Create a request for the method "regionNetworkEndpointGroups.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region The name of the region where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group to delete. It should comply with RFC1035. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String networkEndpointGroup) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.networkEndpointGroup = com.google.api.client.util.Preconditions.checkNotNull(networkEndpointGroup, "Required parameter networkEndpointGroup must be specified."); } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the region where the network endpoint group is located. It should comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region where the network endpoint group is located. It should comply with RFC1035. */ public java.lang.String getRegion() { return region; } /** * The name of the region where the network endpoint group is located. It should comply with * RFC1035. */ public Delete setRegion(java.lang.String region) { this.region = region; return this; } /** The name of the network endpoint group to delete. It should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String networkEndpointGroup; /** The name of the network endpoint group to delete. It should comply with RFC1035. */ public java.lang.String getNetworkEndpointGroup() { return networkEndpointGroup; } /** The name of the network endpoint group to delete. It should comply with RFC1035. */ public Delete setNetworkEndpointGroup(java.lang.String networkEndpointGroup) { this.networkEndpointGroup = networkEndpointGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Detach the network endpoint from the specified network endpoint group. * * Create a request for the method "regionNetworkEndpointGroups.detachNetworkEndpoints". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link DetachNetworkEndpoints#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region The name of the region where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group you are detaching network endpoints from. It should comply * with RFC1035. * @param content the {@link com.google.api.services.compute.model.RegionNetworkEndpointGroupsDetachEndpointsRequest} * @return the request */ public DetachNetworkEndpoints detachNetworkEndpoints(java.lang.String project, java.lang.String region, java.lang.String networkEndpointGroup, com.google.api.services.compute.model.RegionNetworkEndpointGroupsDetachEndpointsRequest content) throws java.io.IOException { DetachNetworkEndpoints result = new DetachNetworkEndpoints(project, region, networkEndpointGroup, content); initialize(result); return result; } public class DetachNetworkEndpoints extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Detach the network endpoint from the specified network endpoint group. * * Create a request for the method "regionNetworkEndpointGroups.detachNetworkEndpoints". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link DetachNetworkEndpoints#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group you are detaching network endpoints from. It should comply * with RFC1035. * @param content the {@link com.google.api.services.compute.model.RegionNetworkEndpointGroupsDetachEndpointsRequest} * @since 1.13 */ protected DetachNetworkEndpoints(java.lang.String project, java.lang.String region, java.lang.String networkEndpointGroup, com.google.api.services.compute.model.RegionNetworkEndpointGroupsDetachEndpointsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.networkEndpointGroup = com.google.api.client.util.Preconditions.checkNotNull(networkEndpointGroup, "Required parameter networkEndpointGroup must be specified."); } @Override public DetachNetworkEndpoints set$Xgafv(java.lang.String $Xgafv) { return (DetachNetworkEndpoints) super.set$Xgafv($Xgafv); } @Override public DetachNetworkEndpoints setAccessToken(java.lang.String accessToken) { return (DetachNetworkEndpoints) super.setAccessToken(accessToken); } @Override public DetachNetworkEndpoints setAlt(java.lang.String alt) { return (DetachNetworkEndpoints) super.setAlt(alt); } @Override public DetachNetworkEndpoints setCallback(java.lang.String callback) { return (DetachNetworkEndpoints) super.setCallback(callback); } @Override public DetachNetworkEndpoints setFields(java.lang.String fields) { return (DetachNetworkEndpoints) super.setFields(fields); } @Override public DetachNetworkEndpoints setKey(java.lang.String key) { return (DetachNetworkEndpoints) super.setKey(key); } @Override public DetachNetworkEndpoints setOauthToken(java.lang.String oauthToken) { return (DetachNetworkEndpoints) super.setOauthToken(oauthToken); } @Override public DetachNetworkEndpoints setPrettyPrint(java.lang.Boolean prettyPrint) { return (DetachNetworkEndpoints) super.setPrettyPrint(prettyPrint); } @Override public DetachNetworkEndpoints setQuotaUser(java.lang.String quotaUser) { return (DetachNetworkEndpoints) super.setQuotaUser(quotaUser); } @Override public DetachNetworkEndpoints setUploadType(java.lang.String uploadType) { return (DetachNetworkEndpoints) super.setUploadType(uploadType); } @Override public DetachNetworkEndpoints setUploadProtocol(java.lang.String uploadProtocol) { return (DetachNetworkEndpoints) super.setUploadProtocol(uploadProtocol); } @Override public DetachNetworkEndpoints setUserIp(java.lang.String userIp) { return (DetachNetworkEndpoints) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public DetachNetworkEndpoints setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the region where the network endpoint group is located. It should comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region where the network endpoint group is located. It should comply with RFC1035. */ public java.lang.String getRegion() { return region; } /** * The name of the region where the network endpoint group is located. It should comply with * RFC1035. */ public DetachNetworkEndpoints setRegion(java.lang.String region) { this.region = region; return this; } /** * The name of the network endpoint group you are detaching network endpoints from. It should * comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String networkEndpointGroup; /** The name of the network endpoint group you are detaching network endpoints from. It should comply with RFC1035. */ public java.lang.String getNetworkEndpointGroup() { return networkEndpointGroup; } /** * The name of the network endpoint group you are detaching network endpoints from. It should * comply with RFC1035. */ public DetachNetworkEndpoints setNetworkEndpointGroup(java.lang.String networkEndpointGroup) { this.networkEndpointGroup = networkEndpointGroup; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder */ public DetachNetworkEndpoints setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public DetachNetworkEndpoints set(String parameterName, Object value) { return (DetachNetworkEndpoints) super.set(parameterName, value); } } /** * Returns the specified network endpoint group. * * Create a request for the method "regionNetworkEndpointGroups.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group. It should comply with RFC1035. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String networkEndpointGroup) throws java.io.IOException { Get result = new Get(project, region, networkEndpointGroup); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Returns the specified network endpoint group. * * Create a request for the method "regionNetworkEndpointGroups.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region The name of the region where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group. It should comply with RFC1035. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String networkEndpointGroup) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NetworkEndpointGroup.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.networkEndpointGroup = com.google.api.client.util.Preconditions.checkNotNull(networkEndpointGroup, "Required parameter networkEndpointGroup must be specified."); } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the region where the network endpoint group is located. It should comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region where the network endpoint group is located. It should comply with RFC1035. */ public java.lang.String getRegion() { return region; } /** * The name of the region where the network endpoint group is located. It should comply with * RFC1035. */ public Get setRegion(java.lang.String region) { this.region = region; return this; } /** The name of the network endpoint group. It should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String networkEndpointGroup; /** The name of the network endpoint group. It should comply with RFC1035. */ public java.lang.String getNetworkEndpointGroup() { return networkEndpointGroup; } /** The name of the network endpoint group. It should comply with RFC1035. */ public Get setNetworkEndpointGroup(java.lang.String networkEndpointGroup) { this.networkEndpointGroup = networkEndpointGroup; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a network endpoint group in the specified project using the parameters that are included * in the request. * * Create a request for the method "regionNetworkEndpointGroups.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region where you want to create the network endpoint group. It should comply with * RFC1035. * @param content the {@link com.google.api.services.compute.model.NetworkEndpointGroup} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.NetworkEndpointGroup content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkEndpointGroups"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a network endpoint group in the specified project using the parameters that are * included in the request. * * Create a request for the method "regionNetworkEndpointGroups.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region where you want to create the network endpoint group. It should comply with * RFC1035. * @param content the {@link com.google.api.services.compute.model.NetworkEndpointGroup} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.NetworkEndpointGroup content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the region where you want to create the network endpoint group. It should * comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region where you want to create the network endpoint group. It should comply with RFC1035. */ public java.lang.String getRegion() { return region; } /** * The name of the region where you want to create the network endpoint group. It should * comply with RFC1035. */ public Insert setRegion(java.lang.String region) { this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of regional network endpoint groups available to the specified project in the * given region. * * Create a request for the method "regionNetworkEndpointGroups.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region where the network endpoint group is located. It should comply with RFC1035. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkEndpointGroups"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of regional network endpoint groups available to the specified project in * the given region. * * Create a request for the method "regionNetworkEndpointGroups.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region The name of the region where the network endpoint group is located. It should comply with RFC1035. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NetworkEndpointGroupList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the region where the network endpoint group is located. It should comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region where the network endpoint group is located. It should comply with RFC1035. */ public java.lang.String getRegion() { return region; } /** * The name of the region where the network endpoint group is located. It should comply with * RFC1035. */ public List setRegion(java.lang.String region) { this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Lists the network endpoints in the specified network endpoint group. * * Create a request for the method "regionNetworkEndpointGroups.listNetworkEndpoints". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListNetworkEndpoints#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region The name of the region where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group from which you want to generate a list of included network * endpoints. It should comply with RFC1035. * @return the request */ public ListNetworkEndpoints listNetworkEndpoints(java.lang.String project, java.lang.String region, java.lang.String networkEndpointGroup) throws java.io.IOException { ListNetworkEndpoints result = new ListNetworkEndpoints(project, region, networkEndpointGroup); initialize(result); return result; } public class ListNetworkEndpoints extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists the network endpoints in the specified network endpoint group. * * Create a request for the method "regionNetworkEndpointGroups.listNetworkEndpoints". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListNetworkEndpoints#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region where the network endpoint group is located. It should comply with RFC1035. * @param networkEndpointGroup The name of the network endpoint group from which you want to generate a list of included network * endpoints. It should comply with RFC1035. * @since 1.13 */ protected ListNetworkEndpoints(java.lang.String project, java.lang.String region, java.lang.String networkEndpointGroup) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.NetworkEndpointGroupsListNetworkEndpoints.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.networkEndpointGroup = com.google.api.client.util.Preconditions.checkNotNull(networkEndpointGroup, "Required parameter networkEndpointGroup must be specified."); } @Override public ListNetworkEndpoints set$Xgafv(java.lang.String $Xgafv) { return (ListNetworkEndpoints) super.set$Xgafv($Xgafv); } @Override public ListNetworkEndpoints setAccessToken(java.lang.String accessToken) { return (ListNetworkEndpoints) super.setAccessToken(accessToken); } @Override public ListNetworkEndpoints setAlt(java.lang.String alt) { return (ListNetworkEndpoints) super.setAlt(alt); } @Override public ListNetworkEndpoints setCallback(java.lang.String callback) { return (ListNetworkEndpoints) super.setCallback(callback); } @Override public ListNetworkEndpoints setFields(java.lang.String fields) { return (ListNetworkEndpoints) super.setFields(fields); } @Override public ListNetworkEndpoints setKey(java.lang.String key) { return (ListNetworkEndpoints) super.setKey(key); } @Override public ListNetworkEndpoints setOauthToken(java.lang.String oauthToken) { return (ListNetworkEndpoints) super.setOauthToken(oauthToken); } @Override public ListNetworkEndpoints setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListNetworkEndpoints) super.setPrettyPrint(prettyPrint); } @Override public ListNetworkEndpoints setQuotaUser(java.lang.String quotaUser) { return (ListNetworkEndpoints) super.setQuotaUser(quotaUser); } @Override public ListNetworkEndpoints setUploadType(java.lang.String uploadType) { return (ListNetworkEndpoints) super.setUploadType(uploadType); } @Override public ListNetworkEndpoints setUploadProtocol(java.lang.String uploadProtocol) { return (ListNetworkEndpoints) super.setUploadProtocol(uploadProtocol); } @Override public ListNetworkEndpoints setUserIp(java.lang.String userIp) { return (ListNetworkEndpoints) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListNetworkEndpoints setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * The name of the region where the network endpoint group is located. It should comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region where the network endpoint group is located. It should comply with RFC1035. */ public java.lang.String getRegion() { return region; } /** * The name of the region where the network endpoint group is located. It should comply with * RFC1035. */ public ListNetworkEndpoints setRegion(java.lang.String region) { this.region = region; return this; } /** * The name of the network endpoint group from which you want to generate a list of included * network endpoints. It should comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String networkEndpointGroup; /** The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035. */ public java.lang.String getNetworkEndpointGroup() { return networkEndpointGroup; } /** * The name of the network endpoint group from which you want to generate a list of included * network endpoints. It should comply with RFC1035. */ public ListNetworkEndpoints setNetworkEndpointGroup(java.lang.String networkEndpointGroup) { this.networkEndpointGroup = networkEndpointGroup; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListNetworkEndpoints setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListNetworkEndpoints setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListNetworkEndpoints setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListNetworkEndpoints setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListNetworkEndpoints setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListNetworkEndpoints set(String parameterName, Object value) { return (ListNetworkEndpoints) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionNetworkFirewallPolicies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionNetworkFirewallPolicies.List request = compute.regionNetworkFirewallPolicies().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionNetworkFirewallPolicies regionNetworkFirewallPolicies() { return new RegionNetworkFirewallPolicies(); } /** * The "regionNetworkFirewallPolicies" collection of methods. */ public class RegionNetworkFirewallPolicies { /** * Inserts an association for the specified network firewall policy. * * Create a request for the method "regionNetworkFirewallPolicies.addAssociation". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddAssociation#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyAssociation} * @return the request */ public AddAssociation addAssociation(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyAssociation content) throws java.io.IOException { AddAssociation result = new AddAssociation(project, region, firewallPolicy, content); initialize(result); return result; } public class AddAssociation extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addAssociation"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Inserts an association for the specified network firewall policy. * * Create a request for the method "regionNetworkFirewallPolicies.addAssociation". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddAssociation#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyAssociation} * @since 1.13 */ protected AddAssociation(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyAssociation content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public AddAssociation set$Xgafv(java.lang.String $Xgafv) { return (AddAssociation) super.set$Xgafv($Xgafv); } @Override public AddAssociation setAccessToken(java.lang.String accessToken) { return (AddAssociation) super.setAccessToken(accessToken); } @Override public AddAssociation setAlt(java.lang.String alt) { return (AddAssociation) super.setAlt(alt); } @Override public AddAssociation setCallback(java.lang.String callback) { return (AddAssociation) super.setCallback(callback); } @Override public AddAssociation setFields(java.lang.String fields) { return (AddAssociation) super.setFields(fields); } @Override public AddAssociation setKey(java.lang.String key) { return (AddAssociation) super.setKey(key); } @Override public AddAssociation setOauthToken(java.lang.String oauthToken) { return (AddAssociation) super.setOauthToken(oauthToken); } @Override public AddAssociation setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddAssociation) super.setPrettyPrint(prettyPrint); } @Override public AddAssociation setQuotaUser(java.lang.String quotaUser) { return (AddAssociation) super.setQuotaUser(quotaUser); } @Override public AddAssociation setUploadType(java.lang.String uploadType) { return (AddAssociation) super.setUploadType(uploadType); } @Override public AddAssociation setUploadProtocol(java.lang.String uploadProtocol) { return (AddAssociation) super.setUploadProtocol(uploadProtocol); } @Override public AddAssociation setUserIp(java.lang.String userIp) { return (AddAssociation) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddAssociation setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public AddAssociation setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public AddAssociation setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** * Indicates whether or not to replace it if an association already exists. This is false by * default, in which case an error will be returned if an association already exists. */ @com.google.api.client.util.Key private java.lang.Boolean replaceExistingAssociation; /** Indicates whether or not to replace it if an association already exists. This is false by default, in which case an error will be returned if an association already exists. */ public java.lang.Boolean getReplaceExistingAssociation() { return replaceExistingAssociation; } /** * Indicates whether or not to replace it if an association already exists. This is false by * default, in which case an error will be returned if an association already exists. */ public AddAssociation setReplaceExistingAssociation(java.lang.Boolean replaceExistingAssociation) { this.replaceExistingAssociation = replaceExistingAssociation; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddAssociation setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddAssociation set(String parameterName, Object value) { return (AddAssociation) super.set(parameterName, value); } } /** * Inserts a rule into a network firewall policy. * * Create a request for the method "regionNetworkFirewallPolicies.addRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyRule} * @return the request */ public AddRule addRule(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyRule content) throws java.io.IOException { AddRule result = new AddRule(project, region, firewallPolicy, content); initialize(result); return result; } public class AddRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Inserts a rule into a network firewall policy. * * Create a request for the method "regionNetworkFirewallPolicies.addRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyRule} * @since 1.13 */ protected AddRule(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyRule content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public AddRule set$Xgafv(java.lang.String $Xgafv) { return (AddRule) super.set$Xgafv($Xgafv); } @Override public AddRule setAccessToken(java.lang.String accessToken) { return (AddRule) super.setAccessToken(accessToken); } @Override public AddRule setAlt(java.lang.String alt) { return (AddRule) super.setAlt(alt); } @Override public AddRule setCallback(java.lang.String callback) { return (AddRule) super.setCallback(callback); } @Override public AddRule setFields(java.lang.String fields) { return (AddRule) super.setFields(fields); } @Override public AddRule setKey(java.lang.String key) { return (AddRule) super.setKey(key); } @Override public AddRule setOauthToken(java.lang.String oauthToken) { return (AddRule) super.setOauthToken(oauthToken); } @Override public AddRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddRule) super.setPrettyPrint(prettyPrint); } @Override public AddRule setQuotaUser(java.lang.String quotaUser) { return (AddRule) super.setQuotaUser(quotaUser); } @Override public AddRule setUploadType(java.lang.String uploadType) { return (AddRule) super.setUploadType(uploadType); } @Override public AddRule setUploadProtocol(java.lang.String uploadProtocol) { return (AddRule) super.setUploadProtocol(uploadProtocol); } @Override public AddRule setUserIp(java.lang.String userIp) { return (AddRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public AddRule setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public AddRule setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** * When rule.priority is not specified, auto choose a unused priority between minPriority and * maxPriority>. This field is exclusive with rule.priority. */ @com.google.api.client.util.Key private java.lang.Integer maxPriority; /** When rule.priority is not specified, auto choose a unused priority between minPriority and maxPriority>. This field is exclusive with rule.priority. */ public java.lang.Integer getMaxPriority() { return maxPriority; } /** * When rule.priority is not specified, auto choose a unused priority between minPriority and * maxPriority>. This field is exclusive with rule.priority. */ public AddRule setMaxPriority(java.lang.Integer maxPriority) { this.maxPriority = maxPriority; return this; } /** * When rule.priority is not specified, auto choose a unused priority between minPriority and * maxPriority>. This field is exclusive with rule.priority. */ @com.google.api.client.util.Key private java.lang.Integer minPriority; /** When rule.priority is not specified, auto choose a unused priority between minPriority and maxPriority>. This field is exclusive with rule.priority. */ public java.lang.Integer getMinPriority() { return minPriority; } /** * When rule.priority is not specified, auto choose a unused priority between minPriority and * maxPriority>. This field is exclusive with rule.priority. */ public AddRule setMinPriority(java.lang.Integer minPriority) { this.minPriority = minPriority; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddRule setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddRule set(String parameterName, Object value) { return (AddRule) super.set(parameterName, value); } } /** * Copies rules to the specified network firewall policy. * * Create a request for the method "regionNetworkFirewallPolicies.cloneRules". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link CloneRules#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to update. * @return the request */ public CloneRules cloneRules(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy) throws java.io.IOException { CloneRules result = new CloneRules(project, region, firewallPolicy); initialize(result); return result; } public class CloneRules extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/cloneRules"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Copies rules to the specified network firewall policy. * * Create a request for the method "regionNetworkFirewallPolicies.cloneRules". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link CloneRules#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to update. * @since 1.13 */ protected CloneRules(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public CloneRules set$Xgafv(java.lang.String $Xgafv) { return (CloneRules) super.set$Xgafv($Xgafv); } @Override public CloneRules setAccessToken(java.lang.String accessToken) { return (CloneRules) super.setAccessToken(accessToken); } @Override public CloneRules setAlt(java.lang.String alt) { return (CloneRules) super.setAlt(alt); } @Override public CloneRules setCallback(java.lang.String callback) { return (CloneRules) super.setCallback(callback); } @Override public CloneRules setFields(java.lang.String fields) { return (CloneRules) super.setFields(fields); } @Override public CloneRules setKey(java.lang.String key) { return (CloneRules) super.setKey(key); } @Override public CloneRules setOauthToken(java.lang.String oauthToken) { return (CloneRules) super.setOauthToken(oauthToken); } @Override public CloneRules setPrettyPrint(java.lang.Boolean prettyPrint) { return (CloneRules) super.setPrettyPrint(prettyPrint); } @Override public CloneRules setQuotaUser(java.lang.String quotaUser) { return (CloneRules) super.setQuotaUser(quotaUser); } @Override public CloneRules setUploadType(java.lang.String uploadType) { return (CloneRules) super.setUploadType(uploadType); } @Override public CloneRules setUploadProtocol(java.lang.String uploadProtocol) { return (CloneRules) super.setUploadProtocol(uploadProtocol); } @Override public CloneRules setUserIp(java.lang.String userIp) { return (CloneRules) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public CloneRules setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public CloneRules setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public CloneRules setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public CloneRules setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** The firewall policy from which to copy rules. */ @com.google.api.client.util.Key private java.lang.String sourceFirewallPolicy; /** The firewall policy from which to copy rules. */ public java.lang.String getSourceFirewallPolicy() { return sourceFirewallPolicy; } /** The firewall policy from which to copy rules. */ public CloneRules setSourceFirewallPolicy(java.lang.String sourceFirewallPolicy) { this.sourceFirewallPolicy = sourceFirewallPolicy; return this; } @Override public CloneRules set(String parameterName, Object value) { return (CloneRules) super.set(parameterName, value); } } /** * Deletes the specified network firewall policy. * * Create a request for the method "regionNetworkFirewallPolicies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy) throws java.io.IOException { Delete result = new Delete(project, region, firewallPolicy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified network firewall policy. * * Create a request for the method "regionNetworkFirewallPolicies.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the firewall policy to delete. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to delete. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to delete. */ public Delete setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified network firewall policy. * * Create a request for the method "regionNetworkFirewallPolicies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to get. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy) throws java.io.IOException { Get result = new Get(project, region, firewallPolicy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified network firewall policy. * * Create a request for the method "regionNetworkFirewallPolicies.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to get. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FirewallPolicy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the firewall policy to get. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to get. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to get. */ public Get setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets an association with the specified name. * * Create a request for the method "regionNetworkFirewallPolicies.getAssociation". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetAssociation#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to which the queried association belongs. * @return the request */ public GetAssociation getAssociation(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy) throws java.io.IOException { GetAssociation result = new GetAssociation(project, region, firewallPolicy); initialize(result); return result; } public class GetAssociation extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getAssociation"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets an association with the specified name. * * Create a request for the method "regionNetworkFirewallPolicies.getAssociation". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetAssociation#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to which the queried association belongs. * @since 1.13 */ protected GetAssociation(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FirewallPolicyAssociation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetAssociation set$Xgafv(java.lang.String $Xgafv) { return (GetAssociation) super.set$Xgafv($Xgafv); } @Override public GetAssociation setAccessToken(java.lang.String accessToken) { return (GetAssociation) super.setAccessToken(accessToken); } @Override public GetAssociation setAlt(java.lang.String alt) { return (GetAssociation) super.setAlt(alt); } @Override public GetAssociation setCallback(java.lang.String callback) { return (GetAssociation) super.setCallback(callback); } @Override public GetAssociation setFields(java.lang.String fields) { return (GetAssociation) super.setFields(fields); } @Override public GetAssociation setKey(java.lang.String key) { return (GetAssociation) super.setKey(key); } @Override public GetAssociation setOauthToken(java.lang.String oauthToken) { return (GetAssociation) super.setOauthToken(oauthToken); } @Override public GetAssociation setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetAssociation) super.setPrettyPrint(prettyPrint); } @Override public GetAssociation setQuotaUser(java.lang.String quotaUser) { return (GetAssociation) super.setQuotaUser(quotaUser); } @Override public GetAssociation setUploadType(java.lang.String uploadType) { return (GetAssociation) super.setUploadType(uploadType); } @Override public GetAssociation setUploadProtocol(java.lang.String uploadProtocol) { return (GetAssociation) super.setUploadProtocol(uploadProtocol); } @Override public GetAssociation setUserIp(java.lang.String userIp) { return (GetAssociation) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetAssociation setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public GetAssociation setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the firewall policy to which the queried association belongs. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to which the queried association belongs. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to which the queried association belongs. */ public GetAssociation setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** The name of the association to get from the firewall policy. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the association to get from the firewall policy. */ public java.lang.String getName() { return name; } /** The name of the association to get from the firewall policy. */ public GetAssociation setName(java.lang.String name) { this.name = name; return this; } @Override public GetAssociation set(String parameterName, Object value) { return (GetAssociation) super.set(parameterName, value); } } /** * Returns the effective firewalls on a given network. * * Create a request for the method "regionNetworkFirewallPolicies.getEffectiveFirewalls". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetEffectiveFirewalls#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param network Network reference * @return the request */ public GetEffectiveFirewalls getEffectiveFirewalls(java.lang.String project, java.lang.String region, java.lang.String network) throws java.io.IOException { GetEffectiveFirewalls result = new GetEffectiveFirewalls(project, region, network); initialize(result); return result; } public class GetEffectiveFirewalls extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies/getEffectiveFirewalls"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Returns the effective firewalls on a given network. * * Create a request for the method "regionNetworkFirewallPolicies.getEffectiveFirewalls". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetEffectiveFirewalls#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param network Network reference * @since 1.13 */ protected GetEffectiveFirewalls(java.lang.String project, java.lang.String region, java.lang.String network) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.network = com.google.api.client.util.Preconditions.checkNotNull(network, "Required parameter network must be specified."); } @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 GetEffectiveFirewalls set$Xgafv(java.lang.String $Xgafv) { return (GetEffectiveFirewalls) super.set$Xgafv($Xgafv); } @Override public GetEffectiveFirewalls setAccessToken(java.lang.String accessToken) { return (GetEffectiveFirewalls) super.setAccessToken(accessToken); } @Override public GetEffectiveFirewalls setAlt(java.lang.String alt) { return (GetEffectiveFirewalls) super.setAlt(alt); } @Override public GetEffectiveFirewalls setCallback(java.lang.String callback) { return (GetEffectiveFirewalls) super.setCallback(callback); } @Override public GetEffectiveFirewalls setFields(java.lang.String fields) { return (GetEffectiveFirewalls) super.setFields(fields); } @Override public GetEffectiveFirewalls setKey(java.lang.String key) { return (GetEffectiveFirewalls) super.setKey(key); } @Override public GetEffectiveFirewalls setOauthToken(java.lang.String oauthToken) { return (GetEffectiveFirewalls) super.setOauthToken(oauthToken); } @Override public GetEffectiveFirewalls setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetEffectiveFirewalls) super.setPrettyPrint(prettyPrint); } @Override public GetEffectiveFirewalls setQuotaUser(java.lang.String quotaUser) { return (GetEffectiveFirewalls) super.setQuotaUser(quotaUser); } @Override public GetEffectiveFirewalls setUploadType(java.lang.String uploadType) { return (GetEffectiveFirewalls) super.setUploadType(uploadType); } @Override public GetEffectiveFirewalls setUploadProtocol(java.lang.String uploadProtocol) { return (GetEffectiveFirewalls) super.setUploadProtocol(uploadProtocol); } @Override public GetEffectiveFirewalls setUserIp(java.lang.String userIp) { return (GetEffectiveFirewalls) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetEffectiveFirewalls setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public GetEffectiveFirewalls setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Network reference */ @com.google.api.client.util.Key private java.lang.String network; /** Network reference */ public java.lang.String getNetwork() { return network; } /** Network reference */ public GetEffectiveFirewalls setNetwork(java.lang.String network) { this.network = network; return this; } @Override public GetEffectiveFirewalls set(String parameterName, Object value) { return (GetEffectiveFirewalls) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "regionNetworkFirewallPolicies.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, region, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "regionNetworkFirewallPolicies.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public GetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Gets a rule of the specified priority. * * Create a request for the method "regionNetworkFirewallPolicies.getRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to which the queried rule belongs. * @return the request */ public GetRule getRule(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy) throws java.io.IOException { GetRule result = new GetRule(project, region, firewallPolicy); initialize(result); return result; } public class GetRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets a rule of the specified priority. * * Create a request for the method "regionNetworkFirewallPolicies.getRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to which the queried rule belongs. * @since 1.13 */ protected GetRule(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FirewallPolicyRule.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetRule set$Xgafv(java.lang.String $Xgafv) { return (GetRule) super.set$Xgafv($Xgafv); } @Override public GetRule setAccessToken(java.lang.String accessToken) { return (GetRule) super.setAccessToken(accessToken); } @Override public GetRule setAlt(java.lang.String alt) { return (GetRule) super.setAlt(alt); } @Override public GetRule setCallback(java.lang.String callback) { return (GetRule) super.setCallback(callback); } @Override public GetRule setFields(java.lang.String fields) { return (GetRule) super.setFields(fields); } @Override public GetRule setKey(java.lang.String key) { return (GetRule) super.setKey(key); } @Override public GetRule setOauthToken(java.lang.String oauthToken) { return (GetRule) super.setOauthToken(oauthToken); } @Override public GetRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetRule) super.setPrettyPrint(prettyPrint); } @Override public GetRule setQuotaUser(java.lang.String quotaUser) { return (GetRule) super.setQuotaUser(quotaUser); } @Override public GetRule setUploadType(java.lang.String uploadType) { return (GetRule) super.setUploadType(uploadType); } @Override public GetRule setUploadProtocol(java.lang.String uploadProtocol) { return (GetRule) super.setUploadProtocol(uploadProtocol); } @Override public GetRule setUserIp(java.lang.String userIp) { return (GetRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public GetRule setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the firewall policy to which the queried rule belongs. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to which the queried rule belongs. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to which the queried rule belongs. */ public GetRule setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** The priority of the rule to get from the firewall policy. */ @com.google.api.client.util.Key private java.lang.Integer priority; /** The priority of the rule to get from the firewall policy. */ public java.lang.Integer getPriority() { return priority; } /** The priority of the rule to get from the firewall policy. */ public GetRule setPriority(java.lang.Integer priority) { this.priority = priority; return this; } @Override public GetRule set(String parameterName, Object value) { return (GetRule) super.set(parameterName, value); } } /** * Creates a new network firewall policy in the specified project and region. * * Create a request for the method "regionNetworkFirewallPolicies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.FirewallPolicy} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.FirewallPolicy content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a new network firewall policy in the specified project and region. * * Create a request for the method "regionNetworkFirewallPolicies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.FirewallPolicy} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.FirewallPolicy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists all the network firewall policies that have been configured for the specified project in * the given region. * * Create a request for the method "regionNetworkFirewallPolicies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Lists all the network firewall policies that have been configured for the specified project in * the given region. * * Create a request for the method "regionNetworkFirewallPolicies.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.FirewallPolicyList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified network firewall policy. * * Create a request for the method "regionNetworkFirewallPolicies.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicy} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicy content) throws java.io.IOException { Patch result = new Patch(project, region, firewallPolicy, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified network firewall policy. * * Create a request for the method "regionNetworkFirewallPolicies.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicy} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicy content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public Patch setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Patches a rule of the specified priority. * * Create a request for the method "regionNetworkFirewallPolicies.patchRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link PatchRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyRule} * @return the request */ public PatchRule patchRule(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyRule content) throws java.io.IOException { PatchRule result = new PatchRule(project, region, firewallPolicy, content); initialize(result); return result; } public class PatchRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/patchRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches a rule of the specified priority. * * Create a request for the method "regionNetworkFirewallPolicies.patchRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link PatchRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to update. * @param content the {@link com.google.api.services.compute.model.FirewallPolicyRule} * @since 1.13 */ protected PatchRule(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy, com.google.api.services.compute.model.FirewallPolicyRule content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public PatchRule set$Xgafv(java.lang.String $Xgafv) { return (PatchRule) super.set$Xgafv($Xgafv); } @Override public PatchRule setAccessToken(java.lang.String accessToken) { return (PatchRule) super.setAccessToken(accessToken); } @Override public PatchRule setAlt(java.lang.String alt) { return (PatchRule) super.setAlt(alt); } @Override public PatchRule setCallback(java.lang.String callback) { return (PatchRule) super.setCallback(callback); } @Override public PatchRule setFields(java.lang.String fields) { return (PatchRule) super.setFields(fields); } @Override public PatchRule setKey(java.lang.String key) { return (PatchRule) super.setKey(key); } @Override public PatchRule setOauthToken(java.lang.String oauthToken) { return (PatchRule) super.setOauthToken(oauthToken); } @Override public PatchRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (PatchRule) super.setPrettyPrint(prettyPrint); } @Override public PatchRule setQuotaUser(java.lang.String quotaUser) { return (PatchRule) super.setQuotaUser(quotaUser); } @Override public PatchRule setUploadType(java.lang.String uploadType) { return (PatchRule) super.setUploadType(uploadType); } @Override public PatchRule setUploadProtocol(java.lang.String uploadProtocol) { return (PatchRule) super.setUploadProtocol(uploadProtocol); } @Override public PatchRule setUserIp(java.lang.String userIp) { return (PatchRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public PatchRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public PatchRule setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public PatchRule setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** The priority of the rule to patch. */ @com.google.api.client.util.Key private java.lang.Integer priority; /** The priority of the rule to patch. */ public java.lang.Integer getPriority() { return priority; } /** The priority of the rule to patch. */ public PatchRule setPriority(java.lang.Integer priority) { this.priority = priority; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public PatchRule setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public PatchRule set(String parameterName, Object value) { return (PatchRule) super.set(parameterName, value); } } /** * Removes an association for the specified network firewall policy. * * Create a request for the method "regionNetworkFirewallPolicies.removeAssociation". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RemoveAssociation#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to update. * @return the request */ public RemoveAssociation removeAssociation(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy) throws java.io.IOException { RemoveAssociation result = new RemoveAssociation(project, region, firewallPolicy); initialize(result); return result; } public class RemoveAssociation extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeAssociation"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Removes an association for the specified network firewall policy. * * Create a request for the method "regionNetworkFirewallPolicies.removeAssociation". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RemoveAssociation#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to update. * @since 1.13 */ protected RemoveAssociation(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public RemoveAssociation set$Xgafv(java.lang.String $Xgafv) { return (RemoveAssociation) super.set$Xgafv($Xgafv); } @Override public RemoveAssociation setAccessToken(java.lang.String accessToken) { return (RemoveAssociation) super.setAccessToken(accessToken); } @Override public RemoveAssociation setAlt(java.lang.String alt) { return (RemoveAssociation) super.setAlt(alt); } @Override public RemoveAssociation setCallback(java.lang.String callback) { return (RemoveAssociation) super.setCallback(callback); } @Override public RemoveAssociation setFields(java.lang.String fields) { return (RemoveAssociation) super.setFields(fields); } @Override public RemoveAssociation setKey(java.lang.String key) { return (RemoveAssociation) super.setKey(key); } @Override public RemoveAssociation setOauthToken(java.lang.String oauthToken) { return (RemoveAssociation) super.setOauthToken(oauthToken); } @Override public RemoveAssociation setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveAssociation) super.setPrettyPrint(prettyPrint); } @Override public RemoveAssociation setQuotaUser(java.lang.String quotaUser) { return (RemoveAssociation) super.setQuotaUser(quotaUser); } @Override public RemoveAssociation setUploadType(java.lang.String uploadType) { return (RemoveAssociation) super.setUploadType(uploadType); } @Override public RemoveAssociation setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveAssociation) super.setUploadProtocol(uploadProtocol); } @Override public RemoveAssociation setUserIp(java.lang.String userIp) { return (RemoveAssociation) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public RemoveAssociation setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public RemoveAssociation setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public RemoveAssociation setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** Name for the association that will be removed. */ @com.google.api.client.util.Key private java.lang.String name; /** Name for the association that will be removed. */ public java.lang.String getName() { return name; } /** Name for the association that will be removed. */ public RemoveAssociation setName(java.lang.String name) { this.name = name; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public RemoveAssociation setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public RemoveAssociation set(String parameterName, Object value) { return (RemoveAssociation) super.set(parameterName, value); } } /** * Deletes a rule of the specified priority. * * Create a request for the method "regionNetworkFirewallPolicies.removeRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RemoveRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to update. * @return the request */ public RemoveRule removeRule(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy) throws java.io.IOException { RemoveRule result = new RemoveRule(project, region, firewallPolicy); initialize(result); return result; } public class RemoveRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern FIREWALL_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes a rule of the specified priority. * * Create a request for the method "regionNetworkFirewallPolicies.removeRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RemoveRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param firewallPolicy Name of the firewall policy to update. * @since 1.13 */ protected RemoveRule(java.lang.String project, java.lang.String region, java.lang.String firewallPolicy) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.firewallPolicy = com.google.api.client.util.Preconditions.checkNotNull(firewallPolicy, "Required parameter firewallPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public RemoveRule set$Xgafv(java.lang.String $Xgafv) { return (RemoveRule) super.set$Xgafv($Xgafv); } @Override public RemoveRule setAccessToken(java.lang.String accessToken) { return (RemoveRule) super.setAccessToken(accessToken); } @Override public RemoveRule setAlt(java.lang.String alt) { return (RemoveRule) super.setAlt(alt); } @Override public RemoveRule setCallback(java.lang.String callback) { return (RemoveRule) super.setCallback(callback); } @Override public RemoveRule setFields(java.lang.String fields) { return (RemoveRule) super.setFields(fields); } @Override public RemoveRule setKey(java.lang.String key) { return (RemoveRule) super.setKey(key); } @Override public RemoveRule setOauthToken(java.lang.String oauthToken) { return (RemoveRule) super.setOauthToken(oauthToken); } @Override public RemoveRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveRule) super.setPrettyPrint(prettyPrint); } @Override public RemoveRule setQuotaUser(java.lang.String quotaUser) { return (RemoveRule) super.setQuotaUser(quotaUser); } @Override public RemoveRule setUploadType(java.lang.String uploadType) { return (RemoveRule) super.setUploadType(uploadType); } @Override public RemoveRule setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveRule) super.setUploadProtocol(uploadProtocol); } @Override public RemoveRule setUserIp(java.lang.String userIp) { return (RemoveRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public RemoveRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public RemoveRule setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the firewall policy to update. */ @com.google.api.client.util.Key private java.lang.String firewallPolicy; /** Name of the firewall policy to update. */ public java.lang.String getFirewallPolicy() { return firewallPolicy; } /** Name of the firewall policy to update. */ public RemoveRule setFirewallPolicy(java.lang.String firewallPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(FIREWALL_POLICY_PATTERN.matcher(firewallPolicy).matches(), "Parameter firewallPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.firewallPolicy = firewallPolicy; return this; } /** The priority of the rule to remove from the firewall policy. */ @com.google.api.client.util.Key private java.lang.Integer priority; /** The priority of the rule to remove from the firewall policy. */ public java.lang.Integer getPriority() { return priority; } /** The priority of the rule to remove from the firewall policy. */ public RemoveRule setPriority(java.lang.Integer priority) { this.priority = priority; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public RemoveRule setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public RemoveRule set(String parameterName, Object value) { return (RemoveRule) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "regionNetworkFirewallPolicies.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, region, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "regionNetworkFirewallPolicies.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public SetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "regionNetworkFirewallPolicies.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, region, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/firewallPolicies/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "regionNetworkFirewallPolicies.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public TestIamPermissions setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionNotificationEndpoints collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionNotificationEndpoints.List request = compute.regionNotificationEndpoints().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionNotificationEndpoints regionNotificationEndpoints() { return new RegionNotificationEndpoints(); } /** * The "regionNotificationEndpoints" collection of methods. */ public class RegionNotificationEndpoints { /** * Deletes the specified NotificationEndpoint in the given region * * Create a request for the method "regionNotificationEndpoints.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param notificationEndpoint Name of the NotificationEndpoint resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String notificationEndpoint) throws java.io.IOException { Delete result = new Delete(project, region, notificationEndpoint); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NOTIFICATION_ENDPOINT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified NotificationEndpoint in the given region * * Create a request for the method "regionNotificationEndpoints.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param notificationEndpoint Name of the NotificationEndpoint resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String notificationEndpoint) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.notificationEndpoint = com.google.api.client.util.Preconditions.checkNotNull(notificationEndpoint, "Required parameter notificationEndpoint must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NOTIFICATION_ENDPOINT_PATTERN.matcher(notificationEndpoint).matches(), "Parameter notificationEndpoint must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the NotificationEndpoint resource to delete. */ @com.google.api.client.util.Key private java.lang.String notificationEndpoint; /** Name of the NotificationEndpoint resource to delete. */ public java.lang.String getNotificationEndpoint() { return notificationEndpoint; } /** Name of the NotificationEndpoint resource to delete. */ public Delete setNotificationEndpoint(java.lang.String notificationEndpoint) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NOTIFICATION_ENDPOINT_PATTERN.matcher(notificationEndpoint).matches(), "Parameter notificationEndpoint must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.notificationEndpoint = notificationEndpoint; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified NotificationEndpoint resource in the given region. * * Create a request for the method "regionNotificationEndpoints.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param notificationEndpoint Name of the NotificationEndpoint resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String notificationEndpoint) throws java.io.IOException { Get result = new Get(project, region, notificationEndpoint); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern NOTIFICATION_ENDPOINT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified NotificationEndpoint resource in the given region. * * Create a request for the method "regionNotificationEndpoints.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param notificationEndpoint Name of the NotificationEndpoint resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String notificationEndpoint) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NotificationEndpoint.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.notificationEndpoint = com.google.api.client.util.Preconditions.checkNotNull(notificationEndpoint, "Required parameter notificationEndpoint must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NOTIFICATION_ENDPOINT_PATTERN.matcher(notificationEndpoint).matches(), "Parameter notificationEndpoint must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the NotificationEndpoint resource to return. */ @com.google.api.client.util.Key private java.lang.String notificationEndpoint; /** Name of the NotificationEndpoint resource to return. */ public java.lang.String getNotificationEndpoint() { return notificationEndpoint; } /** Name of the NotificationEndpoint resource to return. */ public Get setNotificationEndpoint(java.lang.String notificationEndpoint) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NOTIFICATION_ENDPOINT_PATTERN.matcher(notificationEndpoint).matches(), "Parameter notificationEndpoint must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.notificationEndpoint = notificationEndpoint; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Create a NotificationEndpoint in the specified project in the given region using the parameters * that are included in the request. * * Create a request for the method "regionNotificationEndpoints.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.NotificationEndpoint} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.NotificationEndpoint content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/notificationEndpoints"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Create a NotificationEndpoint in the specified project in the given region using the parameters * that are included in the request. * * Create a request for the method "regionNotificationEndpoints.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.NotificationEndpoint} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.NotificationEndpoint content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists the NotificationEndpoints for a project in the given region. * * Create a request for the method "regionNotificationEndpoints.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/notificationEndpoints"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Lists the NotificationEndpoints for a project in the given region. * * Create a request for the method "regionNotificationEndpoints.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NotificationEndpointList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionOperations collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionOperations.List request = compute.regionOperations().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionOperations regionOperations() { return new RegionOperations(); } /** * The "regionOperations" collection of methods. */ public class RegionOperations { /** * Deletes the specified region-specific Operations resource. * * Create a request for the method "regionOperations.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param operation Name of the Operations resource to delete, or its unique numeric identifier. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String operation) throws java.io.IOException { Delete result = new Delete(project, region, operation); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/operations/{operation}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern OPERATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified region-specific Operations resource. * * Create a request for the method "regionOperations.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param operation Name of the Operations resource to delete, or its unique numeric identifier. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String operation) { super(Compute.this, "DELETE", REST_PATH, null, Void.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.operation = com.google.api.client.util.Preconditions.checkNotNull(operation, "Required parameter operation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the Operations resource to delete, or its unique numeric identifier. */ @com.google.api.client.util.Key private java.lang.String operation; /** Name of the Operations resource to delete, or its unique numeric identifier. */ public java.lang.String getOperation() { return operation; } /** Name of the Operations resource to delete, or its unique numeric identifier. */ public Delete setOperation(java.lang.String operation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.operation = operation; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves the specified region-specific Operations resource. * * Create a request for the method "regionOperations.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param operation Name of the Operations resource to return, or its unique numeric identifier. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String operation) throws java.io.IOException { Get result = new Get(project, region, operation); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/operations/{operation}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern OPERATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Retrieves the specified region-specific Operations resource. * * Create a request for the method "regionOperations.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param operation Name of the Operations resource to return, or its unique numeric identifier. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String operation) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.operation = com.google.api.client.util.Preconditions.checkNotNull(operation, "Required parameter operation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the Operations resource to return, or its unique numeric identifier. */ @com.google.api.client.util.Key private java.lang.String operation; /** Name of the Operations resource to return, or its unique numeric identifier. */ public java.lang.String getOperation() { return operation; } /** Name of the Operations resource to return, or its unique numeric identifier. */ public Get setOperation(java.lang.String operation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.operation = operation; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves a list of Operation resources contained within the specified region. * * Create a request for the method "regionOperations.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/operations"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of Operation resources contained within the specified region. * * Create a request for the method "regionOperations.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.OperationList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Waits for the specified Operation resource to return as `DONE` or for the request to approach the * 2 minute deadline, and retrieves the specified Operation resource. This method differs from the * `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns * the current state of the operation, which might be `DONE` or still in progress. This method is * called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, * the request might return before the default deadline is reached, or might return after zero * seconds. - If the default deadline is reached, there is no guarantee that the operation is * actually done when the method returns. Be prepared to retry if the operation is not `DONE`. * * Create a request for the method "regionOperations.wait". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Wait#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param operation Name of the Operations resource to return, or its unique numeric identifier. * @return the request */ public Wait wait(java.lang.String project, java.lang.String region, java.lang.String operation) throws java.io.IOException { Wait result = new Wait(project, region, operation); initialize(result); return result; } public class Wait extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/operations/{operation}/wait"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern OPERATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Waits for the specified Operation resource to return as `DONE` or for the request to approach * the 2 minute deadline, and retrieves the specified Operation resource. This method differs from * the `GET` method in that it waits for no more than the default deadline (2 minutes) and then * returns the current state of the operation, which might be `DONE` or still in progress. This * method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is * overloaded, the request might return before the default deadline is reached, or might return * after zero seconds. - If the default deadline is reached, there is no guarantee that the * operation is actually done when the method returns. Be prepared to retry if the operation is * not `DONE`. * * Create a request for the method "regionOperations.wait". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Wait#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param operation Name of the Operations resource to return, or its unique numeric identifier. * @since 1.13 */ protected Wait(java.lang.String project, java.lang.String region, java.lang.String operation) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.operation = com.google.api.client.util.Preconditions.checkNotNull(operation, "Required parameter operation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Wait set$Xgafv(java.lang.String $Xgafv) { return (Wait) super.set$Xgafv($Xgafv); } @Override public Wait setAccessToken(java.lang.String accessToken) { return (Wait) super.setAccessToken(accessToken); } @Override public Wait setAlt(java.lang.String alt) { return (Wait) super.setAlt(alt); } @Override public Wait setCallback(java.lang.String callback) { return (Wait) super.setCallback(callback); } @Override public Wait setFields(java.lang.String fields) { return (Wait) super.setFields(fields); } @Override public Wait setKey(java.lang.String key) { return (Wait) super.setKey(key); } @Override public Wait setOauthToken(java.lang.String oauthToken) { return (Wait) super.setOauthToken(oauthToken); } @Override public Wait setPrettyPrint(java.lang.Boolean prettyPrint) { return (Wait) super.setPrettyPrint(prettyPrint); } @Override public Wait setQuotaUser(java.lang.String quotaUser) { return (Wait) super.setQuotaUser(quotaUser); } @Override public Wait setUploadType(java.lang.String uploadType) { return (Wait) super.setUploadType(uploadType); } @Override public Wait setUploadProtocol(java.lang.String uploadProtocol) { return (Wait) super.setUploadProtocol(uploadProtocol); } @Override public Wait setUserIp(java.lang.String userIp) { return (Wait) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Wait setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Wait setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the Operations resource to return, or its unique numeric identifier. */ @com.google.api.client.util.Key private java.lang.String operation; /** Name of the Operations resource to return, or its unique numeric identifier. */ public java.lang.String getOperation() { return operation; } /** Name of the Operations resource to return, or its unique numeric identifier. */ public Wait setOperation(java.lang.String operation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.operation = operation; return this; } @Override public Wait set(String parameterName, Object value) { return (Wait) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionSecurityPolicies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionSecurityPolicies.List request = compute.regionSecurityPolicies().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionSecurityPolicies regionSecurityPolicies() { return new RegionSecurityPolicies(); } /** * The "regionSecurityPolicies" collection of methods. */ public class RegionSecurityPolicies { /** * Inserts a rule into a security policy. * * Create a request for the method "regionSecurityPolicies.addRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param securityPolicy Name of the security policy to update. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyRule} * @return the request */ public AddRule addRule(java.lang.String project, java.lang.String region, java.lang.String securityPolicy, com.google.api.services.compute.model.SecurityPolicyRule content) throws java.io.IOException { AddRule result = new AddRule(project, region, securityPolicy, content); initialize(result); return result; } public class AddRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/addRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SECURITY_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Inserts a rule into a security policy. * * Create a request for the method "regionSecurityPolicies.addRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param securityPolicy Name of the security policy to update. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyRule} * @since 1.13 */ protected AddRule(java.lang.String project, java.lang.String region, java.lang.String securityPolicy, com.google.api.services.compute.model.SecurityPolicyRule content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.securityPolicy = com.google.api.client.util.Preconditions.checkNotNull(securityPolicy, "Required parameter securityPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public AddRule set$Xgafv(java.lang.String $Xgafv) { return (AddRule) super.set$Xgafv($Xgafv); } @Override public AddRule setAccessToken(java.lang.String accessToken) { return (AddRule) super.setAccessToken(accessToken); } @Override public AddRule setAlt(java.lang.String alt) { return (AddRule) super.setAlt(alt); } @Override public AddRule setCallback(java.lang.String callback) { return (AddRule) super.setCallback(callback); } @Override public AddRule setFields(java.lang.String fields) { return (AddRule) super.setFields(fields); } @Override public AddRule setKey(java.lang.String key) { return (AddRule) super.setKey(key); } @Override public AddRule setOauthToken(java.lang.String oauthToken) { return (AddRule) super.setOauthToken(oauthToken); } @Override public AddRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddRule) super.setPrettyPrint(prettyPrint); } @Override public AddRule setQuotaUser(java.lang.String quotaUser) { return (AddRule) super.setQuotaUser(quotaUser); } @Override public AddRule setUploadType(java.lang.String uploadType) { return (AddRule) super.setUploadType(uploadType); } @Override public AddRule setUploadProtocol(java.lang.String uploadProtocol) { return (AddRule) super.setUploadProtocol(uploadProtocol); } @Override public AddRule setUserIp(java.lang.String userIp) { return (AddRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public AddRule setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the security policy to update. */ @com.google.api.client.util.Key private java.lang.String securityPolicy; /** Name of the security policy to update. */ public java.lang.String getSecurityPolicy() { return securityPolicy; } /** Name of the security policy to update. */ public AddRule setSecurityPolicy(java.lang.String securityPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.securityPolicy = securityPolicy; return this; } /** If true, the request will not be committed. */ @com.google.api.client.util.Key private java.lang.Boolean validateOnly; /** If true, the request will not be committed. */ public java.lang.Boolean getValidateOnly() { return validateOnly; } /** If true, the request will not be committed. */ public AddRule setValidateOnly(java.lang.Boolean validateOnly) { this.validateOnly = validateOnly; return this; } @Override public AddRule set(String parameterName, Object value) { return (AddRule) super.set(parameterName, value); } } /** * Deletes the specified policy. * * Create a request for the method "regionSecurityPolicies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param securityPolicy Name of the security policy to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String securityPolicy) throws java.io.IOException { Delete result = new Delete(project, region, securityPolicy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SECURITY_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified policy. * * Create a request for the method "regionSecurityPolicies.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param securityPolicy Name of the security policy to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String securityPolicy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.securityPolicy = com.google.api.client.util.Preconditions.checkNotNull(securityPolicy, "Required parameter securityPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the security policy to delete. */ @com.google.api.client.util.Key private java.lang.String securityPolicy; /** Name of the security policy to delete. */ public java.lang.String getSecurityPolicy() { return securityPolicy; } /** Name of the security policy to delete. */ public Delete setSecurityPolicy(java.lang.String securityPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.securityPolicy = securityPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * List all of the ordered rules present in a single specified policy. * * Create a request for the method "regionSecurityPolicies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param securityPolicy Name of the security policy to get. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String securityPolicy) throws java.io.IOException { Get result = new Get(project, region, securityPolicy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SECURITY_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * List all of the ordered rules present in a single specified policy. * * Create a request for the method "regionSecurityPolicies.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param securityPolicy Name of the security policy to get. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String securityPolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SecurityPolicy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.securityPolicy = com.google.api.client.util.Preconditions.checkNotNull(securityPolicy, "Required parameter securityPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the security policy to get. */ @com.google.api.client.util.Key private java.lang.String securityPolicy; /** Name of the security policy to get. */ public java.lang.String getSecurityPolicy() { return securityPolicy; } /** Name of the security policy to get. */ public Get setSecurityPolicy(java.lang.String securityPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.securityPolicy = securityPolicy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets a rule at the specified priority. * * Create a request for the method "regionSecurityPolicies.getRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param securityPolicy Name of the security policy to which the queried rule belongs. * @return the request */ public GetRule getRule(java.lang.String project, java.lang.String region, java.lang.String securityPolicy) throws java.io.IOException { GetRule result = new GetRule(project, region, securityPolicy); initialize(result); return result; } public class GetRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/getRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SECURITY_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets a rule at the specified priority. * * Create a request for the method "regionSecurityPolicies.getRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param securityPolicy Name of the security policy to which the queried rule belongs. * @since 1.13 */ protected GetRule(java.lang.String project, java.lang.String region, java.lang.String securityPolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SecurityPolicyRule.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.securityPolicy = com.google.api.client.util.Preconditions.checkNotNull(securityPolicy, "Required parameter securityPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetRule set$Xgafv(java.lang.String $Xgafv) { return (GetRule) super.set$Xgafv($Xgafv); } @Override public GetRule setAccessToken(java.lang.String accessToken) { return (GetRule) super.setAccessToken(accessToken); } @Override public GetRule setAlt(java.lang.String alt) { return (GetRule) super.setAlt(alt); } @Override public GetRule setCallback(java.lang.String callback) { return (GetRule) super.setCallback(callback); } @Override public GetRule setFields(java.lang.String fields) { return (GetRule) super.setFields(fields); } @Override public GetRule setKey(java.lang.String key) { return (GetRule) super.setKey(key); } @Override public GetRule setOauthToken(java.lang.String oauthToken) { return (GetRule) super.setOauthToken(oauthToken); } @Override public GetRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetRule) super.setPrettyPrint(prettyPrint); } @Override public GetRule setQuotaUser(java.lang.String quotaUser) { return (GetRule) super.setQuotaUser(quotaUser); } @Override public GetRule setUploadType(java.lang.String uploadType) { return (GetRule) super.setUploadType(uploadType); } @Override public GetRule setUploadProtocol(java.lang.String uploadProtocol) { return (GetRule) super.setUploadProtocol(uploadProtocol); } @Override public GetRule setUserIp(java.lang.String userIp) { return (GetRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public GetRule setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the security policy to which the queried rule belongs. */ @com.google.api.client.util.Key private java.lang.String securityPolicy; /** Name of the security policy to which the queried rule belongs. */ public java.lang.String getSecurityPolicy() { return securityPolicy; } /** Name of the security policy to which the queried rule belongs. */ public GetRule setSecurityPolicy(java.lang.String securityPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.securityPolicy = securityPolicy; return this; } /** The priority of the rule to get from the security policy. */ @com.google.api.client.util.Key private java.lang.Integer priority; /** The priority of the rule to get from the security policy. */ public java.lang.Integer getPriority() { return priority; } /** The priority of the rule to get from the security policy. */ public GetRule setPriority(java.lang.Integer priority) { this.priority = priority; return this; } @Override public GetRule set(String parameterName, Object value) { return (GetRule) super.set(parameterName, value); } } /** * Creates a new policy in the specified project using the data included in the request. * * Create a request for the method "regionSecurityPolicies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.SecurityPolicy} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.SecurityPolicy content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/securityPolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a new policy in the specified project using the data included in the request. * * Create a request for the method "regionSecurityPolicies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.SecurityPolicy} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.SecurityPolicy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** If true, the request will not be committed. */ @com.google.api.client.util.Key private java.lang.Boolean validateOnly; /** If true, the request will not be committed. */ public java.lang.Boolean getValidateOnly() { return validateOnly; } /** If true, the request will not be committed. */ public Insert setValidateOnly(java.lang.Boolean validateOnly) { this.validateOnly = validateOnly; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * List all the policies that have been configured for the specified project and region. * * Create a request for the method "regionSecurityPolicies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/securityPolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * List all the policies that have been configured for the specified project and region. * * Create a request for the method "regionSecurityPolicies.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SecurityPolicyList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified policy with the data included in the request. To clear fields in the * policy, leave the fields empty and specify them in the updateMask. This cannot be used to be * update the rules in the policy. Please use the per rule methods like addRule, patchRule, and * removeRule instead. * * Create a request for the method "regionSecurityPolicies.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param securityPolicy Name of the security policy to update. * @param content the {@link com.google.api.services.compute.model.SecurityPolicy} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String securityPolicy, com.google.api.services.compute.model.SecurityPolicy content) throws java.io.IOException { Patch result = new Patch(project, region, securityPolicy, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SECURITY_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified policy with the data included in the request. To clear fields in the * policy, leave the fields empty and specify them in the updateMask. This cannot be used to be * update the rules in the policy. Please use the per rule methods like addRule, patchRule, and * removeRule instead. * * Create a request for the method "regionSecurityPolicies.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param securityPolicy Name of the security policy to update. * @param content the {@link com.google.api.services.compute.model.SecurityPolicy} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String securityPolicy, com.google.api.services.compute.model.SecurityPolicy content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.securityPolicy = com.google.api.client.util.Preconditions.checkNotNull(securityPolicy, "Required parameter securityPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the security policy to update. */ @com.google.api.client.util.Key private java.lang.String securityPolicy; /** Name of the security policy to update. */ public java.lang.String getSecurityPolicy() { return securityPolicy; } /** Name of the security policy to update. */ public Patch setSecurityPolicy(java.lang.String securityPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.securityPolicy = securityPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** Indicates fields to be cleared as part of this request. */ @com.google.api.client.util.Key private String updateMask; /** Indicates fields to be cleared as part of this request. */ public String getUpdateMask() { return updateMask; } /** Indicates fields to be cleared as part of this request. */ public Patch setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Patches a rule at the specified priority. To clear fields in the rule, leave the fields empty and * specify them in the updateMask. * * Create a request for the method "regionSecurityPolicies.patchRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link PatchRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param securityPolicy Name of the security policy to update. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyRule} * @return the request */ public PatchRule patchRule(java.lang.String project, java.lang.String region, java.lang.String securityPolicy, com.google.api.services.compute.model.SecurityPolicyRule content) throws java.io.IOException { PatchRule result = new PatchRule(project, region, securityPolicy, content); initialize(result); return result; } public class PatchRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/patchRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SECURITY_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches a rule at the specified priority. To clear fields in the rule, leave the fields empty * and specify them in the updateMask. * * Create a request for the method "regionSecurityPolicies.patchRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link PatchRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param securityPolicy Name of the security policy to update. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyRule} * @since 1.13 */ protected PatchRule(java.lang.String project, java.lang.String region, java.lang.String securityPolicy, com.google.api.services.compute.model.SecurityPolicyRule content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.securityPolicy = com.google.api.client.util.Preconditions.checkNotNull(securityPolicy, "Required parameter securityPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public PatchRule set$Xgafv(java.lang.String $Xgafv) { return (PatchRule) super.set$Xgafv($Xgafv); } @Override public PatchRule setAccessToken(java.lang.String accessToken) { return (PatchRule) super.setAccessToken(accessToken); } @Override public PatchRule setAlt(java.lang.String alt) { return (PatchRule) super.setAlt(alt); } @Override public PatchRule setCallback(java.lang.String callback) { return (PatchRule) super.setCallback(callback); } @Override public PatchRule setFields(java.lang.String fields) { return (PatchRule) super.setFields(fields); } @Override public PatchRule setKey(java.lang.String key) { return (PatchRule) super.setKey(key); } @Override public PatchRule setOauthToken(java.lang.String oauthToken) { return (PatchRule) super.setOauthToken(oauthToken); } @Override public PatchRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (PatchRule) super.setPrettyPrint(prettyPrint); } @Override public PatchRule setQuotaUser(java.lang.String quotaUser) { return (PatchRule) super.setQuotaUser(quotaUser); } @Override public PatchRule setUploadType(java.lang.String uploadType) { return (PatchRule) super.setUploadType(uploadType); } @Override public PatchRule setUploadProtocol(java.lang.String uploadProtocol) { return (PatchRule) super.setUploadProtocol(uploadProtocol); } @Override public PatchRule setUserIp(java.lang.String userIp) { return (PatchRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public PatchRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public PatchRule setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the security policy to update. */ @com.google.api.client.util.Key private java.lang.String securityPolicy; /** Name of the security policy to update. */ public java.lang.String getSecurityPolicy() { return securityPolicy; } /** Name of the security policy to update. */ public PatchRule setSecurityPolicy(java.lang.String securityPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.securityPolicy = securityPolicy; return this; } /** The priority of the rule to patch. */ @com.google.api.client.util.Key private java.lang.Integer priority; /** The priority of the rule to patch. */ public java.lang.Integer getPriority() { return priority; } /** The priority of the rule to patch. */ public PatchRule setPriority(java.lang.Integer priority) { this.priority = priority; return this; } /** Indicates fields to be cleared as part of this request. */ @com.google.api.client.util.Key private String updateMask; /** Indicates fields to be cleared as part of this request. */ public String getUpdateMask() { return updateMask; } /** Indicates fields to be cleared as part of this request. */ public PatchRule setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } /** If true, the request will not be committed. */ @com.google.api.client.util.Key private java.lang.Boolean validateOnly; /** If true, the request will not be committed. */ public java.lang.Boolean getValidateOnly() { return validateOnly; } /** If true, the request will not be committed. */ public PatchRule setValidateOnly(java.lang.Boolean validateOnly) { this.validateOnly = validateOnly; return this; } @Override public PatchRule set(String parameterName, Object value) { return (PatchRule) super.set(parameterName, value); } } /** * Deletes a rule at the specified priority. * * Create a request for the method "regionSecurityPolicies.removeRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RemoveRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param securityPolicy Name of the security policy to update. * @return the request */ public RemoveRule removeRule(java.lang.String project, java.lang.String region, java.lang.String securityPolicy) throws java.io.IOException { RemoveRule result = new RemoveRule(project, region, securityPolicy); initialize(result); return result; } public class RemoveRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/removeRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SECURITY_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes a rule at the specified priority. * * Create a request for the method "regionSecurityPolicies.removeRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RemoveRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param securityPolicy Name of the security policy to update. * @since 1.13 */ protected RemoveRule(java.lang.String project, java.lang.String region, java.lang.String securityPolicy) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.securityPolicy = com.google.api.client.util.Preconditions.checkNotNull(securityPolicy, "Required parameter securityPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public RemoveRule set$Xgafv(java.lang.String $Xgafv) { return (RemoveRule) super.set$Xgafv($Xgafv); } @Override public RemoveRule setAccessToken(java.lang.String accessToken) { return (RemoveRule) super.setAccessToken(accessToken); } @Override public RemoveRule setAlt(java.lang.String alt) { return (RemoveRule) super.setAlt(alt); } @Override public RemoveRule setCallback(java.lang.String callback) { return (RemoveRule) super.setCallback(callback); } @Override public RemoveRule setFields(java.lang.String fields) { return (RemoveRule) super.setFields(fields); } @Override public RemoveRule setKey(java.lang.String key) { return (RemoveRule) super.setKey(key); } @Override public RemoveRule setOauthToken(java.lang.String oauthToken) { return (RemoveRule) super.setOauthToken(oauthToken); } @Override public RemoveRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveRule) super.setPrettyPrint(prettyPrint); } @Override public RemoveRule setQuotaUser(java.lang.String quotaUser) { return (RemoveRule) super.setQuotaUser(quotaUser); } @Override public RemoveRule setUploadType(java.lang.String uploadType) { return (RemoveRule) super.setUploadType(uploadType); } @Override public RemoveRule setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveRule) super.setUploadProtocol(uploadProtocol); } @Override public RemoveRule setUserIp(java.lang.String userIp) { return (RemoveRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public RemoveRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public RemoveRule setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the security policy to update. */ @com.google.api.client.util.Key private java.lang.String securityPolicy; /** Name of the security policy to update. */ public java.lang.String getSecurityPolicy() { return securityPolicy; } /** Name of the security policy to update. */ public RemoveRule setSecurityPolicy(java.lang.String securityPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.securityPolicy = securityPolicy; return this; } /** The priority of the rule to remove from the security policy. */ @com.google.api.client.util.Key private java.lang.Integer priority; /** The priority of the rule to remove from the security policy. */ public java.lang.Integer getPriority() { return priority; } /** The priority of the rule to remove from the security policy. */ public RemoveRule setPriority(java.lang.Integer priority) { this.priority = priority; return this; } @Override public RemoveRule set(String parameterName, Object value) { return (RemoveRule) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionSslCertificates collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionSslCertificates.List request = compute.regionSslCertificates().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionSslCertificates regionSslCertificates() { return new RegionSslCertificates(); } /** * The "regionSslCertificates" collection of methods. */ public class RegionSslCertificates { /** * Deletes the specified SslCertificate resource in the region. * * Create a request for the method "regionSslCertificates.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param sslCertificate Name of the SslCertificate resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String sslCertificate) throws java.io.IOException { Delete result = new Delete(project, region, sslCertificate); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SSL_CERTIFICATE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified SslCertificate resource in the region. * * Create a request for the method "regionSslCertificates.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param sslCertificate Name of the SslCertificate resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String sslCertificate) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.sslCertificate = com.google.api.client.util.Preconditions.checkNotNull(sslCertificate, "Required parameter sslCertificate must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SSL_CERTIFICATE_PATTERN.matcher(sslCertificate).matches(), "Parameter sslCertificate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the SslCertificate resource to delete. */ @com.google.api.client.util.Key private java.lang.String sslCertificate; /** Name of the SslCertificate resource to delete. */ public java.lang.String getSslCertificate() { return sslCertificate; } /** Name of the SslCertificate resource to delete. */ public Delete setSslCertificate(java.lang.String sslCertificate) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SSL_CERTIFICATE_PATTERN.matcher(sslCertificate).matches(), "Parameter sslCertificate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.sslCertificate = sslCertificate; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified SslCertificate resource in the specified region. Get a list of available * SSL certificates by making a list() request. * * Create a request for the method "regionSslCertificates.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param sslCertificate Name of the SslCertificate resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String sslCertificate) throws java.io.IOException { Get result = new Get(project, region, sslCertificate); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SSL_CERTIFICATE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified SslCertificate resource in the specified region. Get a list of available * SSL certificates by making a list() request. * * Create a request for the method "regionSslCertificates.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param sslCertificate Name of the SslCertificate resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String sslCertificate) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SslCertificate.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.sslCertificate = com.google.api.client.util.Preconditions.checkNotNull(sslCertificate, "Required parameter sslCertificate must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SSL_CERTIFICATE_PATTERN.matcher(sslCertificate).matches(), "Parameter sslCertificate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the SslCertificate resource to return. */ @com.google.api.client.util.Key private java.lang.String sslCertificate; /** Name of the SslCertificate resource to return. */ public java.lang.String getSslCertificate() { return sslCertificate; } /** Name of the SslCertificate resource to return. */ public Get setSslCertificate(java.lang.String sslCertificate) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SSL_CERTIFICATE_PATTERN.matcher(sslCertificate).matches(), "Parameter sslCertificate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.sslCertificate = sslCertificate; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a SslCertificate resource in the specified project and region using the data included in * the request * * Create a request for the method "regionSslCertificates.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.SslCertificate} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.SslCertificate content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/sslCertificates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a SslCertificate resource in the specified project and region using the data included * in the request * * Create a request for the method "regionSslCertificates.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.SslCertificate} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.SslCertificate content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of SslCertificate resources available to the specified project in the * specified region. * * Create a request for the method "regionSslCertificates.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/sslCertificates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves the list of SslCertificate resources available to the specified project in the * specified region. * * Create a request for the method "regionSslCertificates.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SslCertificateList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionSslPolicies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionSslPolicies.List request = compute.regionSslPolicies().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionSslPolicies regionSslPolicies() { return new RegionSslPolicies(); } /** * The "regionSslPolicies" collection of methods. */ public class RegionSslPolicies { /** * Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use * by any TargetHttpsProxy or TargetSslProxy resources. * * Create a request for the method "regionSslPolicies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param sslPolicy Name of the SSL policy to delete. The name must be 1-63 characters long, and comply with RFC1035. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String sslPolicy) throws java.io.IOException { Delete result = new Delete(project, region, sslPolicy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in * use by any TargetHttpsProxy or TargetSslProxy resources. * * Create a request for the method "regionSslPolicies.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param sslPolicy Name of the SSL policy to delete. The name must be 1-63 characters long, and comply with RFC1035. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String sslPolicy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.sslPolicy = com.google.api.client.util.Preconditions.checkNotNull(sslPolicy, "Required parameter sslPolicy must be specified."); } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * Name of the SSL policy to delete. The name must be 1-63 characters long, and comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String sslPolicy; /** Name of the SSL policy to delete. The name must be 1-63 characters long, and comply with RFC1035. */ public java.lang.String getSslPolicy() { return sslPolicy; } /** * Name of the SSL policy to delete. The name must be 1-63 characters long, and comply with * RFC1035. */ public Delete setSslPolicy(java.lang.String sslPolicy) { this.sslPolicy = sslPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Lists all of the ordered rules present in a single specified policy. * * Create a request for the method "regionSslPolicies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param sslPolicy Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String sslPolicy) throws java.io.IOException { Get result = new Get(project, region, sslPolicy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Lists all of the ordered rules present in a single specified policy. * * Create a request for the method "regionSslPolicies.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param sslPolicy Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String sslPolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SslPolicy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.sslPolicy = com.google.api.client.util.Preconditions.checkNotNull(sslPolicy, "Required parameter sslPolicy must be specified."); } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * Name of the SSL policy to update. The name must be 1-63 characters long, and comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String sslPolicy; /** Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035. */ public java.lang.String getSslPolicy() { return sslPolicy; } /** * Name of the SSL policy to update. The name must be 1-63 characters long, and comply with * RFC1035. */ public Get setSslPolicy(java.lang.String sslPolicy) { this.sslPolicy = sslPolicy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a new policy in the specified project and region using the data included in the request. * * Create a request for the method "regionSslPolicies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.SslPolicy} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.SslPolicy content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/sslPolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a new policy in the specified project and region using the data included in the * request. * * Create a request for the method "regionSslPolicies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.SslPolicy} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.SslPolicy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists all the SSL policies that have been configured for the specified project and region. * * Create a request for the method "regionSslPolicies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/sslPolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Lists all the SSL policies that have been configured for the specified project and region. * * Create a request for the method "regionSslPolicies.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SslPoliciesList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Lists all features that can be specified in the SSL policy when using custom profile. * * Create a request for the method "regionSslPolicies.listAvailableFeatures". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListAvailableFeatures#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public ListAvailableFeatures listAvailableFeatures(java.lang.String project, java.lang.String region) throws java.io.IOException { ListAvailableFeatures result = new ListAvailableFeatures(project, region); initialize(result); return result; } public class ListAvailableFeatures extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/sslPolicies/listAvailableFeatures"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Lists all features that can be specified in the SSL policy when using custom profile. * * Create a request for the method "regionSslPolicies.listAvailableFeatures". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListAvailableFeatures#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected ListAvailableFeatures(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SslPoliciesListAvailableFeaturesResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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 ListAvailableFeatures set$Xgafv(java.lang.String $Xgafv) { return (ListAvailableFeatures) super.set$Xgafv($Xgafv); } @Override public ListAvailableFeatures setAccessToken(java.lang.String accessToken) { return (ListAvailableFeatures) super.setAccessToken(accessToken); } @Override public ListAvailableFeatures setAlt(java.lang.String alt) { return (ListAvailableFeatures) super.setAlt(alt); } @Override public ListAvailableFeatures setCallback(java.lang.String callback) { return (ListAvailableFeatures) super.setCallback(callback); } @Override public ListAvailableFeatures setFields(java.lang.String fields) { return (ListAvailableFeatures) super.setFields(fields); } @Override public ListAvailableFeatures setKey(java.lang.String key) { return (ListAvailableFeatures) super.setKey(key); } @Override public ListAvailableFeatures setOauthToken(java.lang.String oauthToken) { return (ListAvailableFeatures) super.setOauthToken(oauthToken); } @Override public ListAvailableFeatures setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListAvailableFeatures) super.setPrettyPrint(prettyPrint); } @Override public ListAvailableFeatures setQuotaUser(java.lang.String quotaUser) { return (ListAvailableFeatures) super.setQuotaUser(quotaUser); } @Override public ListAvailableFeatures setUploadType(java.lang.String uploadType) { return (ListAvailableFeatures) super.setUploadType(uploadType); } @Override public ListAvailableFeatures setUploadProtocol(java.lang.String uploadProtocol) { return (ListAvailableFeatures) super.setUploadProtocol(uploadProtocol); } @Override public ListAvailableFeatures setUserIp(java.lang.String userIp) { return (ListAvailableFeatures) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListAvailableFeatures setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public ListAvailableFeatures setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListAvailableFeatures setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListAvailableFeatures setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListAvailableFeatures setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListAvailableFeatures setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListAvailableFeatures setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListAvailableFeatures set(String parameterName, Object value) { return (ListAvailableFeatures) super.set(parameterName, value); } } /** * Patches the specified SSL policy with the data included in the request. * * Create a request for the method "regionSslPolicies.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param sslPolicy Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.SslPolicy} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String sslPolicy, com.google.api.services.compute.model.SslPolicy content) throws java.io.IOException { Patch result = new Patch(project, region, sslPolicy, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Patches the specified SSL policy with the data included in the request. * * Create a request for the method "regionSslPolicies.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param sslPolicy Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.SslPolicy} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String sslPolicy, com.google.api.services.compute.model.SslPolicy content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.sslPolicy = com.google.api.client.util.Preconditions.checkNotNull(sslPolicy, "Required parameter sslPolicy must be specified."); } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * Name of the SSL policy to update. The name must be 1-63 characters long, and comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String sslPolicy; /** Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035. */ public java.lang.String getSslPolicy() { return sslPolicy; } /** * Name of the SSL policy to update. The name must be 1-63 characters long, and comply with * RFC1035. */ public Patch setSslPolicy(java.lang.String sslPolicy) { this.sslPolicy = sslPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionTargetHttpProxies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionTargetHttpProxies.List request = compute.regionTargetHttpProxies().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionTargetHttpProxies regionTargetHttpProxies() { return new RegionTargetHttpProxies(); } /** * The "regionTargetHttpProxies" collection of methods. */ public class RegionTargetHttpProxies { /** * Deletes the specified TargetHttpProxy resource. * * Create a request for the method "regionTargetHttpProxies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetHttpProxy Name of the TargetHttpProxy resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String targetHttpProxy) throws java.io.IOException { Delete result = new Delete(project, region, targetHttpProxy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_HTTP_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified TargetHttpProxy resource. * * Create a request for the method "regionTargetHttpProxies.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param targetHttpProxy Name of the TargetHttpProxy resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String targetHttpProxy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetHttpProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpProxy, "Required parameter targetHttpProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTP_PROXY_PATTERN.matcher(targetHttpProxy).matches(), "Parameter targetHttpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetHttpProxy resource to delete. */ @com.google.api.client.util.Key private java.lang.String targetHttpProxy; /** Name of the TargetHttpProxy resource to delete. */ public java.lang.String getTargetHttpProxy() { return targetHttpProxy; } /** Name of the TargetHttpProxy resource to delete. */ public Delete setTargetHttpProxy(java.lang.String targetHttpProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTP_PROXY_PATTERN.matcher(targetHttpProxy).matches(), "Parameter targetHttpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpProxy = targetHttpProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified TargetHttpProxy resource in the specified region. * * Create a request for the method "regionTargetHttpProxies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetHttpProxy Name of the TargetHttpProxy resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String targetHttpProxy) throws java.io.IOException { Get result = new Get(project, region, targetHttpProxy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_HTTP_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified TargetHttpProxy resource in the specified region. * * Create a request for the method "regionTargetHttpProxies.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param targetHttpProxy Name of the TargetHttpProxy resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String targetHttpProxy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetHttpProxy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetHttpProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpProxy, "Required parameter targetHttpProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTP_PROXY_PATTERN.matcher(targetHttpProxy).matches(), "Parameter targetHttpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetHttpProxy resource to return. */ @com.google.api.client.util.Key private java.lang.String targetHttpProxy; /** Name of the TargetHttpProxy resource to return. */ public java.lang.String getTargetHttpProxy() { return targetHttpProxy; } /** Name of the TargetHttpProxy resource to return. */ public Get setTargetHttpProxy(java.lang.String targetHttpProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTP_PROXY_PATTERN.matcher(targetHttpProxy).matches(), "Parameter targetHttpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpProxy = targetHttpProxy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a TargetHttpProxy resource in the specified project and region using the data included in * the request. * * Create a request for the method "regionTargetHttpProxies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.TargetHttpProxy} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.TargetHttpProxy content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetHttpProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a TargetHttpProxy resource in the specified project and region using the data included * in the request. * * Create a request for the method "regionTargetHttpProxies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.TargetHttpProxy} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.TargetHttpProxy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of TargetHttpProxy resources available to the specified project in the * specified region. * * Create a request for the method "regionTargetHttpProxies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetHttpProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves the list of TargetHttpProxy resources available to the specified project in the * specified region. * * Create a request for the method "regionTargetHttpProxies.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetHttpProxyList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Changes the URL map for TargetHttpProxy. * * Create a request for the method "regionTargetHttpProxies.setUrlMap". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetUrlMap#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetHttpProxy Name of the TargetHttpProxy to set a URL map for. * @param content the {@link com.google.api.services.compute.model.UrlMapReference} * @return the request */ public SetUrlMap setUrlMap(java.lang.String project, java.lang.String region, java.lang.String targetHttpProxy, com.google.api.services.compute.model.UrlMapReference content) throws java.io.IOException { SetUrlMap result = new SetUrlMap(project, region, targetHttpProxy, content); initialize(result); return result; } public class SetUrlMap extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_HTTP_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Changes the URL map for TargetHttpProxy. * * Create a request for the method "regionTargetHttpProxies.setUrlMap". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetUrlMap#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetHttpProxy Name of the TargetHttpProxy to set a URL map for. * @param content the {@link com.google.api.services.compute.model.UrlMapReference} * @since 1.13 */ protected SetUrlMap(java.lang.String project, java.lang.String region, java.lang.String targetHttpProxy, com.google.api.services.compute.model.UrlMapReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetHttpProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpProxy, "Required parameter targetHttpProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTP_PROXY_PATTERN.matcher(targetHttpProxy).matches(), "Parameter targetHttpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetUrlMap set$Xgafv(java.lang.String $Xgafv) { return (SetUrlMap) super.set$Xgafv($Xgafv); } @Override public SetUrlMap setAccessToken(java.lang.String accessToken) { return (SetUrlMap) super.setAccessToken(accessToken); } @Override public SetUrlMap setAlt(java.lang.String alt) { return (SetUrlMap) super.setAlt(alt); } @Override public SetUrlMap setCallback(java.lang.String callback) { return (SetUrlMap) super.setCallback(callback); } @Override public SetUrlMap setFields(java.lang.String fields) { return (SetUrlMap) super.setFields(fields); } @Override public SetUrlMap setKey(java.lang.String key) { return (SetUrlMap) super.setKey(key); } @Override public SetUrlMap setOauthToken(java.lang.String oauthToken) { return (SetUrlMap) super.setOauthToken(oauthToken); } @Override public SetUrlMap setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetUrlMap) super.setPrettyPrint(prettyPrint); } @Override public SetUrlMap setQuotaUser(java.lang.String quotaUser) { return (SetUrlMap) super.setQuotaUser(quotaUser); } @Override public SetUrlMap setUploadType(java.lang.String uploadType) { return (SetUrlMap) super.setUploadType(uploadType); } @Override public SetUrlMap setUploadProtocol(java.lang.String uploadProtocol) { return (SetUrlMap) super.setUploadProtocol(uploadProtocol); } @Override public SetUrlMap setUserIp(java.lang.String userIp) { return (SetUrlMap) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetUrlMap setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public SetUrlMap setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetHttpProxy to set a URL map for. */ @com.google.api.client.util.Key private java.lang.String targetHttpProxy; /** Name of the TargetHttpProxy to set a URL map for. */ public java.lang.String getTargetHttpProxy() { return targetHttpProxy; } /** Name of the TargetHttpProxy to set a URL map for. */ public SetUrlMap setTargetHttpProxy(java.lang.String targetHttpProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTP_PROXY_PATTERN.matcher(targetHttpProxy).matches(), "Parameter targetHttpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpProxy = targetHttpProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetUrlMap setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetUrlMap set(String parameterName, Object value) { return (SetUrlMap) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionTargetHttpsProxies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionTargetHttpsProxies.List request = compute.regionTargetHttpsProxies().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionTargetHttpsProxies regionTargetHttpsProxies() { return new RegionTargetHttpsProxies(); } /** * The "regionTargetHttpsProxies" collection of methods. */ public class RegionTargetHttpsProxies { /** * Deletes the specified TargetHttpsProxy resource. * * Create a request for the method "regionTargetHttpsProxies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String targetHttpsProxy) throws java.io.IOException { Delete result = new Delete(project, region, targetHttpsProxy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_HTTPS_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified TargetHttpsProxy resource. * * Create a request for the method "regionTargetHttpsProxies.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String targetHttpsProxy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetHttpsProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpsProxy, "Required parameter targetHttpsProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetHttpsProxy resource to delete. */ @com.google.api.client.util.Key private java.lang.String targetHttpsProxy; /** Name of the TargetHttpsProxy resource to delete. */ public java.lang.String getTargetHttpsProxy() { return targetHttpsProxy; } /** Name of the TargetHttpsProxy resource to delete. */ public Delete setTargetHttpsProxy(java.lang.String targetHttpsProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpsProxy = targetHttpsProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified TargetHttpsProxy resource in the specified region. * * Create a request for the method "regionTargetHttpsProxies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String targetHttpsProxy) throws java.io.IOException { Get result = new Get(project, region, targetHttpsProxy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_HTTPS_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified TargetHttpsProxy resource in the specified region. * * Create a request for the method "regionTargetHttpsProxies.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String targetHttpsProxy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetHttpsProxy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetHttpsProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpsProxy, "Required parameter targetHttpsProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetHttpsProxy resource to return. */ @com.google.api.client.util.Key private java.lang.String targetHttpsProxy; /** Name of the TargetHttpsProxy resource to return. */ public java.lang.String getTargetHttpsProxy() { return targetHttpsProxy; } /** Name of the TargetHttpsProxy resource to return. */ public Get setTargetHttpsProxy(java.lang.String targetHttpsProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpsProxy = targetHttpsProxy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a TargetHttpsProxy resource in the specified project and region using the data included * in the request. * * Create a request for the method "regionTargetHttpsProxies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.TargetHttpsProxy} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.TargetHttpsProxy content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetHttpsProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a TargetHttpsProxy resource in the specified project and region using the data included * in the request. * * Create a request for the method "regionTargetHttpsProxies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.TargetHttpsProxy} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.TargetHttpsProxy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of TargetHttpsProxy resources available to the specified project in the * specified region. * * Create a request for the method "regionTargetHttpsProxies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetHttpsProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves the list of TargetHttpsProxy resources available to the specified project in the * specified region. * * Create a request for the method "regionTargetHttpsProxies.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetHttpsProxyList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified regional TargetHttpsProxy resource with the data included in the request. * This method supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "regionTargetHttpsProxies.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to patch. * @param content the {@link com.google.api.services.compute.model.TargetHttpsProxy} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.TargetHttpsProxy content) throws java.io.IOException { Patch result = new Patch(project, region, targetHttpsProxy, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_HTTPS_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified regional TargetHttpsProxy resource with the data included in the request. * This method supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "regionTargetHttpsProxies.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to patch. * @param content the {@link com.google.api.services.compute.model.TargetHttpsProxy} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.TargetHttpsProxy content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetHttpsProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpsProxy, "Required parameter targetHttpsProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetHttpsProxy resource to patch. */ @com.google.api.client.util.Key private java.lang.String targetHttpsProxy; /** Name of the TargetHttpsProxy resource to patch. */ public java.lang.String getTargetHttpsProxy() { return targetHttpsProxy; } /** Name of the TargetHttpsProxy resource to patch. */ public Patch setTargetHttpsProxy(java.lang.String targetHttpsProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpsProxy = targetHttpsProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Replaces SslCertificates for TargetHttpsProxy. * * Create a request for the method "regionTargetHttpsProxies.setSslCertificates". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetSslCertificates#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to set an SslCertificates resource for. * @param content the {@link com.google.api.services.compute.model.RegionTargetHttpsProxiesSetSslCertificatesRequest} * @return the request */ public SetSslCertificates setSslCertificates(java.lang.String project, java.lang.String region, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.RegionTargetHttpsProxiesSetSslCertificatesRequest content) throws java.io.IOException { SetSslCertificates result = new SetSslCertificates(project, region, targetHttpsProxy, content); initialize(result); return result; } public class SetSslCertificates extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_HTTPS_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Replaces SslCertificates for TargetHttpsProxy. * * Create a request for the method "regionTargetHttpsProxies.setSslCertificates". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetSslCertificates#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to set an SslCertificates resource for. * @param content the {@link com.google.api.services.compute.model.RegionTargetHttpsProxiesSetSslCertificatesRequest} * @since 1.13 */ protected SetSslCertificates(java.lang.String project, java.lang.String region, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.RegionTargetHttpsProxiesSetSslCertificatesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetHttpsProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpsProxy, "Required parameter targetHttpsProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetSslCertificates set$Xgafv(java.lang.String $Xgafv) { return (SetSslCertificates) super.set$Xgafv($Xgafv); } @Override public SetSslCertificates setAccessToken(java.lang.String accessToken) { return (SetSslCertificates) super.setAccessToken(accessToken); } @Override public SetSslCertificates setAlt(java.lang.String alt) { return (SetSslCertificates) super.setAlt(alt); } @Override public SetSslCertificates setCallback(java.lang.String callback) { return (SetSslCertificates) super.setCallback(callback); } @Override public SetSslCertificates setFields(java.lang.String fields) { return (SetSslCertificates) super.setFields(fields); } @Override public SetSslCertificates setKey(java.lang.String key) { return (SetSslCertificates) super.setKey(key); } @Override public SetSslCertificates setOauthToken(java.lang.String oauthToken) { return (SetSslCertificates) super.setOauthToken(oauthToken); } @Override public SetSslCertificates setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetSslCertificates) super.setPrettyPrint(prettyPrint); } @Override public SetSslCertificates setQuotaUser(java.lang.String quotaUser) { return (SetSslCertificates) super.setQuotaUser(quotaUser); } @Override public SetSslCertificates setUploadType(java.lang.String uploadType) { return (SetSslCertificates) super.setUploadType(uploadType); } @Override public SetSslCertificates setUploadProtocol(java.lang.String uploadProtocol) { return (SetSslCertificates) super.setUploadProtocol(uploadProtocol); } @Override public SetSslCertificates setUserIp(java.lang.String userIp) { return (SetSslCertificates) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetSslCertificates setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public SetSslCertificates setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetHttpsProxy resource to set an SslCertificates resource for. */ @com.google.api.client.util.Key private java.lang.String targetHttpsProxy; /** Name of the TargetHttpsProxy resource to set an SslCertificates resource for. */ public java.lang.String getTargetHttpsProxy() { return targetHttpsProxy; } /** Name of the TargetHttpsProxy resource to set an SslCertificates resource for. */ public SetSslCertificates setTargetHttpsProxy(java.lang.String targetHttpsProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpsProxy = targetHttpsProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetSslCertificates setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetSslCertificates set(String parameterName, Object value) { return (SetSslCertificates) super.set(parameterName, value); } } /** * Changes the URL map for TargetHttpsProxy. * * Create a request for the method "regionTargetHttpsProxies.setUrlMap". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetUrlMap#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetHttpsProxy Name of the TargetHttpsProxy to set a URL map for. * @param content the {@link com.google.api.services.compute.model.UrlMapReference} * @return the request */ public SetUrlMap setUrlMap(java.lang.String project, java.lang.String region, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.UrlMapReference content) throws java.io.IOException { SetUrlMap result = new SetUrlMap(project, region, targetHttpsProxy, content); initialize(result); return result; } public class SetUrlMap extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_HTTPS_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Changes the URL map for TargetHttpsProxy. * * Create a request for the method "regionTargetHttpsProxies.setUrlMap". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetUrlMap#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetHttpsProxy Name of the TargetHttpsProxy to set a URL map for. * @param content the {@link com.google.api.services.compute.model.UrlMapReference} * @since 1.13 */ protected SetUrlMap(java.lang.String project, java.lang.String region, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.UrlMapReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetHttpsProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpsProxy, "Required parameter targetHttpsProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetUrlMap set$Xgafv(java.lang.String $Xgafv) { return (SetUrlMap) super.set$Xgafv($Xgafv); } @Override public SetUrlMap setAccessToken(java.lang.String accessToken) { return (SetUrlMap) super.setAccessToken(accessToken); } @Override public SetUrlMap setAlt(java.lang.String alt) { return (SetUrlMap) super.setAlt(alt); } @Override public SetUrlMap setCallback(java.lang.String callback) { return (SetUrlMap) super.setCallback(callback); } @Override public SetUrlMap setFields(java.lang.String fields) { return (SetUrlMap) super.setFields(fields); } @Override public SetUrlMap setKey(java.lang.String key) { return (SetUrlMap) super.setKey(key); } @Override public SetUrlMap setOauthToken(java.lang.String oauthToken) { return (SetUrlMap) super.setOauthToken(oauthToken); } @Override public SetUrlMap setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetUrlMap) super.setPrettyPrint(prettyPrint); } @Override public SetUrlMap setQuotaUser(java.lang.String quotaUser) { return (SetUrlMap) super.setQuotaUser(quotaUser); } @Override public SetUrlMap setUploadType(java.lang.String uploadType) { return (SetUrlMap) super.setUploadType(uploadType); } @Override public SetUrlMap setUploadProtocol(java.lang.String uploadProtocol) { return (SetUrlMap) super.setUploadProtocol(uploadProtocol); } @Override public SetUrlMap setUserIp(java.lang.String userIp) { return (SetUrlMap) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetUrlMap setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public SetUrlMap setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetHttpsProxy to set a URL map for. */ @com.google.api.client.util.Key private java.lang.String targetHttpsProxy; /** Name of the TargetHttpsProxy to set a URL map for. */ public java.lang.String getTargetHttpsProxy() { return targetHttpsProxy; } /** Name of the TargetHttpsProxy to set a URL map for. */ public SetUrlMap setTargetHttpsProxy(java.lang.String targetHttpsProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpsProxy = targetHttpsProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetUrlMap setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetUrlMap set(String parameterName, Object value) { return (SetUrlMap) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionTargetTcpProxies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionTargetTcpProxies.List request = compute.regionTargetTcpProxies().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionTargetTcpProxies regionTargetTcpProxies() { return new RegionTargetTcpProxies(); } /** * The "regionTargetTcpProxies" collection of methods. */ public class RegionTargetTcpProxies { /** * Deletes the specified TargetTcpProxy resource. * * Create a request for the method "regionTargetTcpProxies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetTcpProxy Name of the TargetTcpProxy resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String targetTcpProxy) throws java.io.IOException { Delete result = new Delete(project, region, targetTcpProxy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetTcpProxies/{targetTcpProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_TCP_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified TargetTcpProxy resource. * * Create a request for the method "regionTargetTcpProxies.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param targetTcpProxy Name of the TargetTcpProxy resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String targetTcpProxy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetTcpProxy = com.google.api.client.util.Preconditions.checkNotNull(targetTcpProxy, "Required parameter targetTcpProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_TCP_PROXY_PATTERN.matcher(targetTcpProxy).matches(), "Parameter targetTcpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetTcpProxy resource to delete. */ @com.google.api.client.util.Key private java.lang.String targetTcpProxy; /** Name of the TargetTcpProxy resource to delete. */ public java.lang.String getTargetTcpProxy() { return targetTcpProxy; } /** Name of the TargetTcpProxy resource to delete. */ public Delete setTargetTcpProxy(java.lang.String targetTcpProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_TCP_PROXY_PATTERN.matcher(targetTcpProxy).matches(), "Parameter targetTcpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetTcpProxy = targetTcpProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified TargetTcpProxy resource. * * Create a request for the method "regionTargetTcpProxies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetTcpProxy Name of the TargetTcpProxy resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String targetTcpProxy) throws java.io.IOException { Get result = new Get(project, region, targetTcpProxy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetTcpProxies/{targetTcpProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_TCP_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified TargetTcpProxy resource. * * Create a request for the method "regionTargetTcpProxies.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param targetTcpProxy Name of the TargetTcpProxy resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String targetTcpProxy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetTcpProxy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetTcpProxy = com.google.api.client.util.Preconditions.checkNotNull(targetTcpProxy, "Required parameter targetTcpProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_TCP_PROXY_PATTERN.matcher(targetTcpProxy).matches(), "Parameter targetTcpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetTcpProxy resource to return. */ @com.google.api.client.util.Key private java.lang.String targetTcpProxy; /** Name of the TargetTcpProxy resource to return. */ public java.lang.String getTargetTcpProxy() { return targetTcpProxy; } /** Name of the TargetTcpProxy resource to return. */ public Get setTargetTcpProxy(java.lang.String targetTcpProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_TCP_PROXY_PATTERN.matcher(targetTcpProxy).matches(), "Parameter targetTcpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetTcpProxy = targetTcpProxy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a TargetTcpProxy resource in the specified project and region using the data included in * the request. * * Create a request for the method "regionTargetTcpProxies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.TargetTcpProxy} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.TargetTcpProxy content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetTcpProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a TargetTcpProxy resource in the specified project and region using the data included * in the request. * * Create a request for the method "regionTargetTcpProxies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.TargetTcpProxy} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.TargetTcpProxy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of TargetTcpProxy resources available to the specified project in a given * region. * * Create a request for the method "regionTargetTcpProxies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetTcpProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of TargetTcpProxy resources available to the specified project in a given * region. * * Create a request for the method "regionTargetTcpProxies.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetTcpProxyList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionUrlMaps collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionUrlMaps.List request = compute.regionUrlMaps().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionUrlMaps regionUrlMaps() { return new RegionUrlMaps(); } /** * The "regionUrlMaps" collection of methods. */ public class RegionUrlMaps { /** * Deletes the specified UrlMap resource. * * Create a request for the method "regionUrlMaps.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param urlMap Name of the UrlMap resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String urlMap) throws java.io.IOException { Delete result = new Delete(project, region, urlMap); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/urlMaps/{urlMap}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern URL_MAP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified UrlMap resource. * * Create a request for the method "regionUrlMaps.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param urlMap Name of the UrlMap resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String urlMap) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.urlMap = com.google.api.client.util.Preconditions.checkNotNull(urlMap, "Required parameter urlMap must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the UrlMap resource to delete. */ @com.google.api.client.util.Key private java.lang.String urlMap; /** Name of the UrlMap resource to delete. */ public java.lang.String getUrlMap() { return urlMap; } /** Name of the UrlMap resource to delete. */ public Delete setUrlMap(java.lang.String urlMap) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.urlMap = urlMap; return this; } /** begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. */ @com.google.api.client.util.Key private java.lang.String requestId; /** begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. */ public java.lang.String getRequestId() { return requestId; } /** begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. */ 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); } } /** * Returns the specified UrlMap resource. * * Create a request for the method "regionUrlMaps.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param urlMap Name of the UrlMap resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String urlMap) throws java.io.IOException { Get result = new Get(project, region, urlMap); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/urlMaps/{urlMap}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern URL_MAP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified UrlMap resource. * * Create a request for the method "regionUrlMaps.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param urlMap Name of the UrlMap resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String urlMap) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.UrlMap.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.urlMap = com.google.api.client.util.Preconditions.checkNotNull(urlMap, "Required parameter urlMap must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the UrlMap resource to return. */ @com.google.api.client.util.Key private java.lang.String urlMap; /** Name of the UrlMap resource to return. */ public java.lang.String getUrlMap() { return urlMap; } /** Name of the UrlMap resource to return. */ public Get setUrlMap(java.lang.String urlMap) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.urlMap = urlMap; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a UrlMap resource in the specified project using the data included in the request. * * Create a request for the method "regionUrlMaps.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.UrlMap} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.UrlMap content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/urlMaps"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a UrlMap resource in the specified project using the data included in the request. * * Create a request for the method "regionUrlMaps.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.UrlMap} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.UrlMap content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. */ @com.google.api.client.util.Key private java.lang.String requestId; /** begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. */ public java.lang.String getRequestId() { return requestId; } /** begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of UrlMap resources available to the specified project in the specified * region. * * Create a request for the method "regionUrlMaps.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/urlMaps"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves the list of UrlMap resources available to the specified project in the specified * region. * * Create a request for the method "regionUrlMaps.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.UrlMapList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified UrlMap resource with the data included in the request. This method supports * PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "regionUrlMaps.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param urlMap Name of the UrlMap resource to patch. * @param content the {@link com.google.api.services.compute.model.UrlMap} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String urlMap, com.google.api.services.compute.model.UrlMap content) throws java.io.IOException { Patch result = new Patch(project, region, urlMap, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/urlMaps/{urlMap}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern URL_MAP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified UrlMap resource with the data included in the request. This method * supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "regionUrlMaps.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param urlMap Name of the UrlMap resource to patch. * @param content the {@link com.google.api.services.compute.model.UrlMap} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String urlMap, com.google.api.services.compute.model.UrlMap content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.urlMap = com.google.api.client.util.Preconditions.checkNotNull(urlMap, "Required parameter urlMap must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the UrlMap resource to patch. */ @com.google.api.client.util.Key private java.lang.String urlMap; /** Name of the UrlMap resource to patch. */ public java.lang.String getUrlMap() { return urlMap; } /** Name of the UrlMap resource to patch. */ public Patch setUrlMap(java.lang.String urlMap) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.urlMap = urlMap; return this; } /** begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. */ @com.google.api.client.util.Key private java.lang.String requestId; /** begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. */ public java.lang.String getRequestId() { return requestId; } /** begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates the specified UrlMap resource with the data included in the request. * * Create a request for the method "regionUrlMaps.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param urlMap Name of the UrlMap resource to update. * @param content the {@link com.google.api.services.compute.model.UrlMap} * @return the request */ public Update update(java.lang.String project, java.lang.String region, java.lang.String urlMap, com.google.api.services.compute.model.UrlMap content) throws java.io.IOException { Update result = new Update(project, region, urlMap, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/urlMaps/{urlMap}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern URL_MAP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified UrlMap resource with the data included in the request. * * Create a request for the method "regionUrlMaps.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param urlMap Name of the UrlMap resource to update. * @param content the {@link com.google.api.services.compute.model.UrlMap} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String region, java.lang.String urlMap, com.google.api.services.compute.model.UrlMap content) { super(Compute.this, "PUT", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.urlMap = com.google.api.client.util.Preconditions.checkNotNull(urlMap, "Required parameter urlMap must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Update setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the UrlMap resource to update. */ @com.google.api.client.util.Key private java.lang.String urlMap; /** Name of the UrlMap resource to update. */ public java.lang.String getUrlMap() { return urlMap; } /** Name of the UrlMap resource to update. */ public Update setUrlMap(java.lang.String urlMap) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.urlMap = urlMap; return this; } /** begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. */ @com.google.api.client.util.Key private java.lang.String requestId; /** begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. */ public java.lang.String getRequestId() { return requestId; } /** begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } /** * Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be * run. Calling this method does NOT create the UrlMap. * * Create a request for the method "regionUrlMaps.validate". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Validate#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param urlMap Name of the UrlMap resource to be validated as. * @param content the {@link com.google.api.services.compute.model.RegionUrlMapsValidateRequest} * @return the request */ public Validate validate(java.lang.String project, java.lang.String region, java.lang.String urlMap, com.google.api.services.compute.model.RegionUrlMapsValidateRequest content) throws java.io.IOException { Validate result = new Validate(project, region, urlMap, content); initialize(result); return result; } public class Validate extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/urlMaps/{urlMap}/validate"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern URL_MAP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be * run. Calling this method does NOT create the UrlMap. * * Create a request for the method "regionUrlMaps.validate". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Validate#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param urlMap Name of the UrlMap resource to be validated as. * @param content the {@link com.google.api.services.compute.model.RegionUrlMapsValidateRequest} * @since 1.13 */ protected Validate(java.lang.String project, java.lang.String region, java.lang.String urlMap, com.google.api.services.compute.model.RegionUrlMapsValidateRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.UrlMapsValidateResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.urlMap = com.google.api.client.util.Preconditions.checkNotNull(urlMap, "Required parameter urlMap must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Validate set$Xgafv(java.lang.String $Xgafv) { return (Validate) super.set$Xgafv($Xgafv); } @Override public Validate setAccessToken(java.lang.String accessToken) { return (Validate) super.setAccessToken(accessToken); } @Override public Validate setAlt(java.lang.String alt) { return (Validate) super.setAlt(alt); } @Override public Validate setCallback(java.lang.String callback) { return (Validate) super.setCallback(callback); } @Override public Validate setFields(java.lang.String fields) { return (Validate) super.setFields(fields); } @Override public Validate setKey(java.lang.String key) { return (Validate) super.setKey(key); } @Override public Validate setOauthToken(java.lang.String oauthToken) { return (Validate) super.setOauthToken(oauthToken); } @Override public Validate setPrettyPrint(java.lang.Boolean prettyPrint) { return (Validate) super.setPrettyPrint(prettyPrint); } @Override public Validate setQuotaUser(java.lang.String quotaUser) { return (Validate) super.setQuotaUser(quotaUser); } @Override public Validate setUploadType(java.lang.String uploadType) { return (Validate) super.setUploadType(uploadType); } @Override public Validate setUploadProtocol(java.lang.String uploadProtocol) { return (Validate) super.setUploadProtocol(uploadProtocol); } @Override public Validate setUserIp(java.lang.String userIp) { return (Validate) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Validate setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Validate setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the UrlMap resource to be validated as. */ @com.google.api.client.util.Key private java.lang.String urlMap; /** Name of the UrlMap resource to be validated as. */ public java.lang.String getUrlMap() { return urlMap; } /** Name of the UrlMap resource to be validated as. */ public Validate setUrlMap(java.lang.String urlMap) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.urlMap = urlMap; return this; } @Override public Validate set(String parameterName, Object value) { return (Validate) super.set(parameterName, value); } } } /** * An accessor for creating requests from the RegionZones collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.RegionZones.List request = compute.regionZones().list(parameters ...)}
   * 
* * @return the resource collection */ public RegionZones regionZones() { return new RegionZones(); } /** * The "regionZones" collection of methods. */ public class RegionZones { /** * Retrieves the list of Zone resources under the specific region available to the specified * project. * * Create a request for the method "regionZones.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Region for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/zones"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves the list of Zone resources under the specific region available to the specified * project. * * Create a request for the method "regionZones.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Region for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ZoneList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Region for this request. */ public java.lang.String getRegion() { return region; } /** Region for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Regions collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Regions.List request = compute.regions().list(parameters ...)}
   * 
* * @return the resource collection */ public Regions regions() { return new Regions(); } /** * The "regions" collection of methods. */ public class Regions { /** * Returns the specified Region resource. To decrease latency for this method, you can optionally * omit any unneeded information from the response by using a field mask. This practice is * especially recommended for unused quota information (the `quotas` field). To exclude one or more * fields, set your request's `fields` query parameter to only include the fields you need. For * example, to only include the `id` and `selfLink` fields, add the query parameter * `?fields=id,selfLink` to your request. This method fails if the quota information is unavailable * for the region and if the organization policy constraint compute.requireBasicQuotaInResponse is * enforced. This constraint, when enforced, disables the fail-open behaviour when quota information * (the `items.quotas` field) is unavailable for the region. It is recommended to use the default * setting for the constraint unless your application requires the fail-closed behaviour for this * method. * * Create a request for the method "regions.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region) throws java.io.IOException { Get result = new Get(project, region); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified Region resource. To decrease latency for this method, you can optionally * omit any unneeded information from the response by using a field mask. This practice is * especially recommended for unused quota information (the `quotas` field). To exclude one or * more fields, set your request's `fields` query parameter to only include the fields you need. * For example, to only include the `id` and `selfLink` fields, add the query parameter * `?fields=id,selfLink` to your request. This method fails if the quota information is * unavailable for the region and if the organization policy constraint * compute.requireBasicQuotaInResponse is enforced. This constraint, when enforced, disables the * fail-open behaviour when quota information (the `items.quotas` field) is unavailable for the * region. It is recommended to use the default setting for the constraint unless your application * requires the fail-closed behaviour for this method. * * Create a request for the method "regions.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Region.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region resource to return. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region resource to return. */ public java.lang.String getRegion() { return region; } /** Name of the region resource to return. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.region = region; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves the list of region resources available to the specified project. To decrease latency * for this method, you can optionally omit any unneeded information from the response by using a * field mask. This practice is especially recommended for unused quota information (the * `items.quotas` field). To exclude one or more fields, set your request's `fields` query parameter * to only include the fields you need. For example, to only include the `id` and `selfLink` fields, * add the query parameter `?fields=id,selfLink` to your request. This method fails if the quota * information is unavailable for the region and if the organization policy constraint * compute.requireBasicQuotaInResponse is enforced. This constraint, when enforced, disables the * fail-open behaviour when quota information (the `items.quotas` field) is unavailable for the * region. It is recommended to use the default setting for the constraint unless your application * requires the fail-closed behaviour for this method. * * Create a request for the method "regions.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of region resources available to the specified project. To decrease latency * for this method, you can optionally omit any unneeded information from the response by using a * field mask. This practice is especially recommended for unused quota information (the * `items.quotas` field). To exclude one or more fields, set your request's `fields` query * parameter to only include the fields you need. For example, to only include the `id` and * `selfLink` fields, add the query parameter `?fields=id,selfLink` to your request. This method * fails if the quota information is unavailable for the region and if the organization policy * constraint compute.requireBasicQuotaInResponse is enforced. This constraint, when enforced, * disables the fail-open behaviour when quota information (the `items.quotas` field) is * unavailable for the region. It is recommended to use the default setting for the constraint * unless your application requires the fail-closed behaviour for this method. * * Create a request for the method "regions.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.RegionList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Reservations collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Reservations.List request = compute.reservations().list(parameters ...)}
   * 
* * @return the resource collection */ public Reservations reservations() { return new Reservations(); } /** * The "reservations" collection of methods. */ public class Reservations { /** * Retrieves an aggregated list of reservations. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "reservations.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/reservations"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of reservations. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "reservations.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ReservationAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified reservation. * * Create a request for the method "reservations.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param reservation Name of the reservation to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String zone, java.lang.String reservation) throws java.io.IOException { Delete result = new Delete(project, zone, reservation); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/reservations/{reservation}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESERVATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified reservation. * * Create a request for the method "reservations.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone for this request. * @param reservation Name of the reservation to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String zone, java.lang.String reservation) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.reservation = com.google.api.client.util.Preconditions.checkNotNull(reservation, "Required parameter reservation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESERVATION_PATTERN.matcher(reservation).matches(), "Parameter reservation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public Delete setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the reservation to delete. */ @com.google.api.client.util.Key private java.lang.String reservation; /** Name of the reservation to delete. */ public java.lang.String getReservation() { return reservation; } /** Name of the reservation to delete. */ public Delete setReservation(java.lang.String reservation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESERVATION_PATTERN.matcher(reservation).matches(), "Parameter reservation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.reservation = reservation; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Retrieves information about the specified reservation. * * Create a request for the method "reservations.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param reservation Name of the reservation to retrieve. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String reservation) throws java.io.IOException { Get result = new Get(project, zone, reservation); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/reservations/{reservation}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESERVATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Retrieves information about the specified reservation. * * Create a request for the method "reservations.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone for this request. * @param reservation Name of the reservation to retrieve. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String reservation) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Reservation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.reservation = com.google.api.client.util.Preconditions.checkNotNull(reservation, "Required parameter reservation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESERVATION_PATTERN.matcher(reservation).matches(), "Parameter reservation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the reservation to retrieve. */ @com.google.api.client.util.Key private java.lang.String reservation; /** Name of the reservation to retrieve. */ public java.lang.String getReservation() { return reservation; } /** Name of the reservation to retrieve. */ public Get setReservation(java.lang.String reservation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESERVATION_PATTERN.matcher(reservation).matches(), "Parameter reservation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.reservation = reservation; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "reservations.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, zone, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/reservations/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "reservations.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public GetIamPolicy setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a new reservation. For more information, read Reserving zonal resources. * * Create a request for the method "reservations.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.Reservation} * @return the request */ public Insert insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.Reservation content) throws java.io.IOException { Insert result = new Insert(project, zone, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/reservations"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a new reservation. For more information, read Reserving zonal resources. * * Create a request for the method "reservations.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.Reservation} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.Reservation content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public Insert setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * A list of all the reservations that have been configured for the specified project in specified * zone. * * Create a request for the method "reservations.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/reservations"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * A list of all the reservations that have been configured for the specified project in specified * zone. * * Create a request for the method "reservations.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ReservationList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public List setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Resizes the reservation (applicable to standalone reservations only). For more information, read * Modifying reservations. * * Create a request for the method "reservations.resize". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Resize#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param reservation Name of the reservation to update. * @param content the {@link com.google.api.services.compute.model.ReservationsResizeRequest} * @return the request */ public Resize resize(java.lang.String project, java.lang.String zone, java.lang.String reservation, com.google.api.services.compute.model.ReservationsResizeRequest content) throws java.io.IOException { Resize result = new Resize(project, zone, reservation, content); initialize(result); return result; } public class Resize extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/reservations/{reservation}/resize"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESERVATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Resizes the reservation (applicable to standalone reservations only). For more information, * read Modifying reservations. * * Create a request for the method "reservations.resize". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Resize#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param reservation Name of the reservation to update. * @param content the {@link com.google.api.services.compute.model.ReservationsResizeRequest} * @since 1.13 */ protected Resize(java.lang.String project, java.lang.String zone, java.lang.String reservation, com.google.api.services.compute.model.ReservationsResizeRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.reservation = com.google.api.client.util.Preconditions.checkNotNull(reservation, "Required parameter reservation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESERVATION_PATTERN.matcher(reservation).matches(), "Parameter reservation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Resize set$Xgafv(java.lang.String $Xgafv) { return (Resize) super.set$Xgafv($Xgafv); } @Override public Resize setAccessToken(java.lang.String accessToken) { return (Resize) super.setAccessToken(accessToken); } @Override public Resize setAlt(java.lang.String alt) { return (Resize) super.setAlt(alt); } @Override public Resize setCallback(java.lang.String callback) { return (Resize) super.setCallback(callback); } @Override public Resize setFields(java.lang.String fields) { return (Resize) super.setFields(fields); } @Override public Resize setKey(java.lang.String key) { return (Resize) super.setKey(key); } @Override public Resize setOauthToken(java.lang.String oauthToken) { return (Resize) super.setOauthToken(oauthToken); } @Override public Resize setPrettyPrint(java.lang.Boolean prettyPrint) { return (Resize) super.setPrettyPrint(prettyPrint); } @Override public Resize setQuotaUser(java.lang.String quotaUser) { return (Resize) super.setQuotaUser(quotaUser); } @Override public Resize setUploadType(java.lang.String uploadType) { return (Resize) super.setUploadType(uploadType); } @Override public Resize setUploadProtocol(java.lang.String uploadProtocol) { return (Resize) super.setUploadProtocol(uploadProtocol); } @Override public Resize setUserIp(java.lang.String userIp) { return (Resize) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Resize setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public Resize setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the reservation to update. */ @com.google.api.client.util.Key private java.lang.String reservation; /** Name of the reservation to update. */ public java.lang.String getReservation() { return reservation; } /** Name of the reservation to update. */ public Resize setReservation(java.lang.String reservation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESERVATION_PATTERN.matcher(reservation).matches(), "Parameter reservation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.reservation = reservation; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Resize setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Resize set(String parameterName, Object value) { return (Resize) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "reservations.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, zone, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/reservations/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "reservations.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetIamPolicy setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "reservations.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, zone, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/reservations/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "reservations.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public TestIamPermissions setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } /** * Update share settings of the reservation. * * Create a request for the method "reservations.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param reservation Name of the reservation to update. * @param content the {@link com.google.api.services.compute.model.Reservation} * @return the request */ public Update update(java.lang.String project, java.lang.String zone, java.lang.String reservation, com.google.api.services.compute.model.Reservation content) throws java.io.IOException { Update result = new Update(project, zone, reservation, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/reservations/{reservation}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESERVATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Update share settings of the reservation. * * Create a request for the method "reservations.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param reservation Name of the reservation to update. * @param content the {@link com.google.api.services.compute.model.Reservation} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String zone, java.lang.String reservation, com.google.api.services.compute.model.Reservation content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.reservation = com.google.api.client.util.Preconditions.checkNotNull(reservation, "Required parameter reservation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESERVATION_PATTERN.matcher(reservation).matches(), "Parameter reservation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public Update setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the reservation to update. */ @com.google.api.client.util.Key private java.lang.String reservation; /** Name of the reservation to update. */ public java.lang.String getReservation() { return reservation; } /** Name of the reservation to update. */ public Update setReservation(java.lang.String reservation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESERVATION_PATTERN.matcher(reservation).matches(), "Parameter reservation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.reservation = reservation; return this; } @com.google.api.client.util.Key private java.util.List paths; /** */ public java.util.List getPaths() { return paths; } public Update setPaths(java.util.List paths) { this.paths = paths; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** Update_mask indicates fields to be updated as part of this request. */ @com.google.api.client.util.Key private String updateMask; /** Update_mask indicates fields to be updated as part of this request. */ public String getUpdateMask() { return updateMask; } /** Update_mask indicates fields to be updated as part of this request. */ public Update setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the ResourcePolicies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.ResourcePolicies.List request = compute.resourcePolicies().list(parameters ...)}
   * 
* * @return the resource collection */ public ResourcePolicies resourcePolicies() { return new ResourcePolicies(); } /** * The "resourcePolicies" collection of methods. */ public class ResourcePolicies { /** * Retrieves an aggregated list of resource policies. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "resourcePolicies.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/resourcePolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of resource policies. To prevent failure, Google recommends that * you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "resourcePolicies.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ResourcePolicyAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified resource policy. * * Create a request for the method "resourcePolicies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param resourcePolicy Name of the resource policy to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String resourcePolicy) throws java.io.IOException { Delete result = new Delete(project, region, resourcePolicy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified resource policy. * * Create a request for the method "resourcePolicies.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param resourcePolicy Name of the resource policy to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String resourcePolicy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resourcePolicy = com.google.api.client.util.Preconditions.checkNotNull(resourcePolicy, "Required parameter resourcePolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_POLICY_PATTERN.matcher(resourcePolicy).matches(), "Parameter resourcePolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the resource policy to delete. */ @com.google.api.client.util.Key private java.lang.String resourcePolicy; /** Name of the resource policy to delete. */ public java.lang.String getResourcePolicy() { return resourcePolicy; } /** Name of the resource policy to delete. */ public Delete setResourcePolicy(java.lang.String resourcePolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_POLICY_PATTERN.matcher(resourcePolicy).matches(), "Parameter resourcePolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resourcePolicy = resourcePolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Retrieves all information of the specified resource policy. * * Create a request for the method "resourcePolicies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param resourcePolicy Name of the resource policy to retrieve. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String resourcePolicy) throws java.io.IOException { Get result = new Get(project, region, resourcePolicy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Retrieves all information of the specified resource policy. * * Create a request for the method "resourcePolicies.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param resourcePolicy Name of the resource policy to retrieve. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String resourcePolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ResourcePolicy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resourcePolicy = com.google.api.client.util.Preconditions.checkNotNull(resourcePolicy, "Required parameter resourcePolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_POLICY_PATTERN.matcher(resourcePolicy).matches(), "Parameter resourcePolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the resource policy to retrieve. */ @com.google.api.client.util.Key private java.lang.String resourcePolicy; /** Name of the resource policy to retrieve. */ public java.lang.String getResourcePolicy() { return resourcePolicy; } /** Name of the resource policy to retrieve. */ public Get setResourcePolicy(java.lang.String resourcePolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_POLICY_PATTERN.matcher(resourcePolicy).matches(), "Parameter resourcePolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resourcePolicy = resourcePolicy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "resourcePolicies.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, region, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "resourcePolicies.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public GetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a new resource policy. * * Create a request for the method "resourcePolicies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.ResourcePolicy} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.ResourcePolicy content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/resourcePolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a new resource policy. * * Create a request for the method "resourcePolicies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.ResourcePolicy} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.ResourcePolicy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * A list all the resource policies that have been configured for the specified project in specified * region. * * Create a request for the method "resourcePolicies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/resourcePolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * A list all the resource policies that have been configured for the specified project in * specified region. * * Create a request for the method "resourcePolicies.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ResourcePolicyList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Modify the specified resource policy. * * Create a request for the method "resourcePolicies.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param resourcePolicy Id of the resource policy to patch. * @param content the {@link com.google.api.services.compute.model.ResourcePolicy} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String resourcePolicy, com.google.api.services.compute.model.ResourcePolicy content) throws java.io.IOException { Patch result = new Patch(project, region, resourcePolicy, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Modify the specified resource policy. * * Create a request for the method "resourcePolicies.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param resourcePolicy Id of the resource policy to patch. * @param content the {@link com.google.api.services.compute.model.ResourcePolicy} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String resourcePolicy, com.google.api.services.compute.model.ResourcePolicy content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resourcePolicy = com.google.api.client.util.Preconditions.checkNotNull(resourcePolicy, "Required parameter resourcePolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_POLICY_PATTERN.matcher(resourcePolicy).matches(), "Parameter resourcePolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Id of the resource policy to patch. */ @com.google.api.client.util.Key private java.lang.String resourcePolicy; /** Id of the resource policy to patch. */ public java.lang.String getResourcePolicy() { return resourcePolicy; } /** Id of the resource policy to patch. */ public Patch setResourcePolicy(java.lang.String resourcePolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_POLICY_PATTERN.matcher(resourcePolicy).matches(), "Parameter resourcePolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resourcePolicy = resourcePolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** update_mask indicates fields to be updated as part of this request. */ @com.google.api.client.util.Key private String updateMask; /** update_mask indicates fields to be updated as part of this request. */ public String getUpdateMask() { return updateMask; } /** update_mask indicates fields to be updated as part of this request. */ public Patch setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "resourcePolicies.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, region, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/resourcePolicies/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "resourcePolicies.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public SetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "resourcePolicies.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, region, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/resourcePolicies/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "resourcePolicies.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public TestIamPermissions setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Routers collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Routers.List request = compute.routers().list(parameters ...)}
   * 
* * @return the resource collection */ public Routers routers() { return new Routers(); } /** * The "routers" collection of methods. */ public class Routers { /** * Retrieves an aggregated list of routers. To prevent failure, Google recommends that you set the * `returnPartialSuccess` parameter to `true`. * * Create a request for the method "routers.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/routers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of routers. To prevent failure, Google recommends that you set the * `returnPartialSuccess` parameter to `true`. * * Create a request for the method "routers.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.RouterAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified Router resource. * * Create a request for the method "routers.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String router) throws java.io.IOException { Delete result = new Delete(project, region, router); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/routers/{router}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern ROUTER_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified Router resource. * * Create a request for the method "routers.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String router) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.router = com.google.api.client.util.Preconditions.checkNotNull(router, "Required parameter router must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTER_PATTERN.matcher(router).matches(), "Parameter router must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the Router resource to delete. */ @com.google.api.client.util.Key private java.lang.String router; /** Name of the Router resource to delete. */ public java.lang.String getRouter() { return router; } /** Name of the Router resource to delete. */ public Delete setRouter(java.lang.String router) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTER_PATTERN.matcher(router).matches(), "Parameter router must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.router = router; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified Router resource. * * Create a request for the method "routers.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String router) throws java.io.IOException { Get result = new Get(project, region, router); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/routers/{router}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern ROUTER_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified Router resource. * * Create a request for the method "routers.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String router) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Router.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.router = com.google.api.client.util.Preconditions.checkNotNull(router, "Required parameter router must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTER_PATTERN.matcher(router).matches(), "Parameter router must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the Router resource to return. */ @com.google.api.client.util.Key private java.lang.String router; /** Name of the Router resource to return. */ public java.lang.String getRouter() { return router; } /** Name of the Router resource to return. */ public Get setRouter(java.lang.String router) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTER_PATTERN.matcher(router).matches(), "Parameter router must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.router = router; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves runtime NAT IP information. * * Create a request for the method "routers.getNatIpInfo". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetNatIpInfo#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to query for Nat IP information. The name should conform to RFC1035. * @return the request */ public GetNatIpInfo getNatIpInfo(java.lang.String project, java.lang.String region, java.lang.String router) throws java.io.IOException { GetNatIpInfo result = new GetNatIpInfo(project, region, router); initialize(result); return result; } public class GetNatIpInfo extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves runtime NAT IP information. * * Create a request for the method "routers.getNatIpInfo". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetNatIpInfo#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to query for Nat IP information. The name should conform to RFC1035. * @since 1.13 */ protected GetNatIpInfo(java.lang.String project, java.lang.String region, java.lang.String router) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.NatIpInfoResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.router = com.google.api.client.util.Preconditions.checkNotNull(router, "Required parameter router must be specified."); } @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 GetNatIpInfo set$Xgafv(java.lang.String $Xgafv) { return (GetNatIpInfo) super.set$Xgafv($Xgafv); } @Override public GetNatIpInfo setAccessToken(java.lang.String accessToken) { return (GetNatIpInfo) super.setAccessToken(accessToken); } @Override public GetNatIpInfo setAlt(java.lang.String alt) { return (GetNatIpInfo) super.setAlt(alt); } @Override public GetNatIpInfo setCallback(java.lang.String callback) { return (GetNatIpInfo) super.setCallback(callback); } @Override public GetNatIpInfo setFields(java.lang.String fields) { return (GetNatIpInfo) super.setFields(fields); } @Override public GetNatIpInfo setKey(java.lang.String key) { return (GetNatIpInfo) super.setKey(key); } @Override public GetNatIpInfo setOauthToken(java.lang.String oauthToken) { return (GetNatIpInfo) super.setOauthToken(oauthToken); } @Override public GetNatIpInfo setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetNatIpInfo) super.setPrettyPrint(prettyPrint); } @Override public GetNatIpInfo setQuotaUser(java.lang.String quotaUser) { return (GetNatIpInfo) super.setQuotaUser(quotaUser); } @Override public GetNatIpInfo setUploadType(java.lang.String uploadType) { return (GetNatIpInfo) super.setUploadType(uploadType); } @Override public GetNatIpInfo setUploadProtocol(java.lang.String uploadProtocol) { return (GetNatIpInfo) super.setUploadProtocol(uploadProtocol); } @Override public GetNatIpInfo setUserIp(java.lang.String userIp) { return (GetNatIpInfo) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetNatIpInfo setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public GetNatIpInfo setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * Name of the Router resource to query for Nat IP information. The name should conform to * RFC1035. */ @com.google.api.client.util.Key private java.lang.String router; /** Name of the Router resource to query for Nat IP information. The name should conform to RFC1035. */ public java.lang.String getRouter() { return router; } /** * Name of the Router resource to query for Nat IP information. The name should conform to * RFC1035. */ public GetNatIpInfo setRouter(java.lang.String router) { this.router = router; return this; } /** * Name of the nat service to filter the NAT IP information. If it is omitted, all nats for * this router will be returned. Name should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String natName; /** Name of the nat service to filter the NAT IP information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035. */ public java.lang.String getNatName() { return natName; } /** * Name of the nat service to filter the NAT IP information. If it is omitted, all nats for * this router will be returned. Name should conform to RFC1035. */ public GetNatIpInfo setNatName(java.lang.String natName) { this.natName = natName; return this; } @Override public GetNatIpInfo set(String parameterName, Object value) { return (GetNatIpInfo) super.set(parameterName, value); } } /** * Retrieves runtime Nat mapping information of VM endpoints. * * Create a request for the method "routers.getNatMappingInfo". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetNatMappingInfo#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to query for Nat Mapping information of VM endpoints. * @return the request */ public GetNatMappingInfo getNatMappingInfo(java.lang.String project, java.lang.String region, java.lang.String router) throws java.io.IOException { GetNatMappingInfo result = new GetNatMappingInfo(project, region, router); initialize(result); return result; } public class GetNatMappingInfo extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/routers/{router}/getNatMappingInfo"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern ROUTER_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Retrieves runtime Nat mapping information of VM endpoints. * * Create a request for the method "routers.getNatMappingInfo". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetNatMappingInfo#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to query for Nat Mapping information of VM endpoints. * @since 1.13 */ protected GetNatMappingInfo(java.lang.String project, java.lang.String region, java.lang.String router) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.VmEndpointNatMappingsList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.router = com.google.api.client.util.Preconditions.checkNotNull(router, "Required parameter router must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTER_PATTERN.matcher(router).matches(), "Parameter router must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetNatMappingInfo set$Xgafv(java.lang.String $Xgafv) { return (GetNatMappingInfo) super.set$Xgafv($Xgafv); } @Override public GetNatMappingInfo setAccessToken(java.lang.String accessToken) { return (GetNatMappingInfo) super.setAccessToken(accessToken); } @Override public GetNatMappingInfo setAlt(java.lang.String alt) { return (GetNatMappingInfo) super.setAlt(alt); } @Override public GetNatMappingInfo setCallback(java.lang.String callback) { return (GetNatMappingInfo) super.setCallback(callback); } @Override public GetNatMappingInfo setFields(java.lang.String fields) { return (GetNatMappingInfo) super.setFields(fields); } @Override public GetNatMappingInfo setKey(java.lang.String key) { return (GetNatMappingInfo) super.setKey(key); } @Override public GetNatMappingInfo setOauthToken(java.lang.String oauthToken) { return (GetNatMappingInfo) super.setOauthToken(oauthToken); } @Override public GetNatMappingInfo setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetNatMappingInfo) super.setPrettyPrint(prettyPrint); } @Override public GetNatMappingInfo setQuotaUser(java.lang.String quotaUser) { return (GetNatMappingInfo) super.setQuotaUser(quotaUser); } @Override public GetNatMappingInfo setUploadType(java.lang.String uploadType) { return (GetNatMappingInfo) super.setUploadType(uploadType); } @Override public GetNatMappingInfo setUploadProtocol(java.lang.String uploadProtocol) { return (GetNatMappingInfo) super.setUploadProtocol(uploadProtocol); } @Override public GetNatMappingInfo setUserIp(java.lang.String userIp) { return (GetNatMappingInfo) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetNatMappingInfo setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public GetNatMappingInfo setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the Router resource to query for Nat Mapping information of VM endpoints. */ @com.google.api.client.util.Key private java.lang.String router; /** Name of the Router resource to query for Nat Mapping information of VM endpoints. */ public java.lang.String getRouter() { return router; } /** Name of the Router resource to query for Nat Mapping information of VM endpoints. */ public GetNatMappingInfo setRouter(java.lang.String router) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTER_PATTERN.matcher(router).matches(), "Parameter router must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.router = router; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public GetNatMappingInfo setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public GetNatMappingInfo setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Name of the nat service to filter the Nat Mapping information. If it is omitted, all nats * for this router will be returned. Name should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String natName; /** Name of the nat service to filter the Nat Mapping information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035. */ public java.lang.String getNatName() { return natName; } /** * Name of the nat service to filter the Nat Mapping information. If it is omitted, all nats * for this router will be returned. Name should conform to RFC1035. */ public GetNatMappingInfo setNatName(java.lang.String natName) { this.natName = natName; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public GetNatMappingInfo setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public GetNatMappingInfo setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public GetNatMappingInfo setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public GetNatMappingInfo set(String parameterName, Object value) { return (GetNatMappingInfo) super.set(parameterName, value); } } /** * Retrieves runtime information of the specified router. * * Create a request for the method "routers.getRouterStatus". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetRouterStatus#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to query. * @return the request */ public GetRouterStatus getRouterStatus(java.lang.String project, java.lang.String region, java.lang.String router) throws java.io.IOException { GetRouterStatus result = new GetRouterStatus(project, region, router); initialize(result); return result; } public class GetRouterStatus extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/routers/{router}/getRouterStatus"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern ROUTER_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Retrieves runtime information of the specified router. * * Create a request for the method "routers.getRouterStatus". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetRouterStatus#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to query. * @since 1.13 */ protected GetRouterStatus(java.lang.String project, java.lang.String region, java.lang.String router) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.RouterStatusResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.router = com.google.api.client.util.Preconditions.checkNotNull(router, "Required parameter router must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTER_PATTERN.matcher(router).matches(), "Parameter router must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetRouterStatus set$Xgafv(java.lang.String $Xgafv) { return (GetRouterStatus) super.set$Xgafv($Xgafv); } @Override public GetRouterStatus setAccessToken(java.lang.String accessToken) { return (GetRouterStatus) super.setAccessToken(accessToken); } @Override public GetRouterStatus setAlt(java.lang.String alt) { return (GetRouterStatus) super.setAlt(alt); } @Override public GetRouterStatus setCallback(java.lang.String callback) { return (GetRouterStatus) super.setCallback(callback); } @Override public GetRouterStatus setFields(java.lang.String fields) { return (GetRouterStatus) super.setFields(fields); } @Override public GetRouterStatus setKey(java.lang.String key) { return (GetRouterStatus) super.setKey(key); } @Override public GetRouterStatus setOauthToken(java.lang.String oauthToken) { return (GetRouterStatus) super.setOauthToken(oauthToken); } @Override public GetRouterStatus setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetRouterStatus) super.setPrettyPrint(prettyPrint); } @Override public GetRouterStatus setQuotaUser(java.lang.String quotaUser) { return (GetRouterStatus) super.setQuotaUser(quotaUser); } @Override public GetRouterStatus setUploadType(java.lang.String uploadType) { return (GetRouterStatus) super.setUploadType(uploadType); } @Override public GetRouterStatus setUploadProtocol(java.lang.String uploadProtocol) { return (GetRouterStatus) super.setUploadProtocol(uploadProtocol); } @Override public GetRouterStatus setUserIp(java.lang.String userIp) { return (GetRouterStatus) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetRouterStatus setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public GetRouterStatus setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the Router resource to query. */ @com.google.api.client.util.Key private java.lang.String router; /** Name of the Router resource to query. */ public java.lang.String getRouter() { return router; } /** Name of the Router resource to query. */ public GetRouterStatus setRouter(java.lang.String router) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTER_PATTERN.matcher(router).matches(), "Parameter router must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.router = router; return this; } @Override public GetRouterStatus set(String parameterName, Object value) { return (GetRouterStatus) super.set(parameterName, value); } } /** * Creates a Router resource in the specified project and region using the data included in the * request. * * Create a request for the method "routers.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.Router} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Router content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/routers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a Router resource in the specified project and region using the data included in the * request. * * Create a request for the method "routers.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.Router} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Router content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of Router resources available to the specified project. * * Create a request for the method "routers.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/routers"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of Router resources available to the specified project. * * Create a request for the method "routers.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.RouterList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified Router resource with the data included in the request. This method supports * PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "routers.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to patch. * @param content the {@link com.google.api.services.compute.model.Router} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String router, com.google.api.services.compute.model.Router content) throws java.io.IOException { Patch result = new Patch(project, region, router, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/routers/{router}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern ROUTER_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified Router resource with the data included in the request. This method * supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "routers.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to patch. * @param content the {@link com.google.api.services.compute.model.Router} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String router, com.google.api.services.compute.model.Router content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.router = com.google.api.client.util.Preconditions.checkNotNull(router, "Required parameter router must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTER_PATTERN.matcher(router).matches(), "Parameter router must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the Router resource to patch. */ @com.google.api.client.util.Key private java.lang.String router; /** Name of the Router resource to patch. */ public java.lang.String getRouter() { return router; } /** Name of the Router resource to patch. */ public Patch setRouter(java.lang.String router) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTER_PATTERN.matcher(router).matches(), "Parameter router must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.router = router; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Preview fields auto-generated during router create and update operations. Calling this method * does NOT create or update the router. * * Create a request for the method "routers.preview". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Preview#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to query. * @param content the {@link com.google.api.services.compute.model.Router} * @return the request */ public Preview preview(java.lang.String project, java.lang.String region, java.lang.String router, com.google.api.services.compute.model.Router content) throws java.io.IOException { Preview result = new Preview(project, region, router, content); initialize(result); return result; } public class Preview extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/routers/{router}/preview"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern ROUTER_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Preview fields auto-generated during router create and update operations. Calling this method * does NOT create or update the router. * * Create a request for the method "routers.preview". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Preview#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to query. * @param content the {@link com.google.api.services.compute.model.Router} * @since 1.13 */ protected Preview(java.lang.String project, java.lang.String region, java.lang.String router, com.google.api.services.compute.model.Router content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.RoutersPreviewResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.router = com.google.api.client.util.Preconditions.checkNotNull(router, "Required parameter router must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTER_PATTERN.matcher(router).matches(), "Parameter router must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Preview set$Xgafv(java.lang.String $Xgafv) { return (Preview) super.set$Xgafv($Xgafv); } @Override public Preview setAccessToken(java.lang.String accessToken) { return (Preview) super.setAccessToken(accessToken); } @Override public Preview setAlt(java.lang.String alt) { return (Preview) super.setAlt(alt); } @Override public Preview setCallback(java.lang.String callback) { return (Preview) super.setCallback(callback); } @Override public Preview setFields(java.lang.String fields) { return (Preview) super.setFields(fields); } @Override public Preview setKey(java.lang.String key) { return (Preview) super.setKey(key); } @Override public Preview setOauthToken(java.lang.String oauthToken) { return (Preview) super.setOauthToken(oauthToken); } @Override public Preview setPrettyPrint(java.lang.Boolean prettyPrint) { return (Preview) super.setPrettyPrint(prettyPrint); } @Override public Preview setQuotaUser(java.lang.String quotaUser) { return (Preview) super.setQuotaUser(quotaUser); } @Override public Preview setUploadType(java.lang.String uploadType) { return (Preview) super.setUploadType(uploadType); } @Override public Preview setUploadProtocol(java.lang.String uploadProtocol) { return (Preview) super.setUploadProtocol(uploadProtocol); } @Override public Preview setUserIp(java.lang.String userIp) { return (Preview) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Preview setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Preview setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the Router resource to query. */ @com.google.api.client.util.Key private java.lang.String router; /** Name of the Router resource to query. */ public java.lang.String getRouter() { return router; } /** Name of the Router resource to query. */ public Preview setRouter(java.lang.String router) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTER_PATTERN.matcher(router).matches(), "Parameter router must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.router = router; return this; } @Override public Preview set(String parameterName, Object value) { return (Preview) super.set(parameterName, value); } } /** * Updates the specified Router resource with the data included in the request. This method conforms * to PUT semantics, which requests that the state of the target resource be created or replaced * with the state defined by the representation enclosed in the request message payload. * * Create a request for the method "routers.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to update. * @param content the {@link com.google.api.services.compute.model.Router} * @return the request */ public Update update(java.lang.String project, java.lang.String region, java.lang.String router, com.google.api.services.compute.model.Router content) throws java.io.IOException { Update result = new Update(project, region, router, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/routers/{router}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern ROUTER_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified Router resource with the data included in the request. This method * conforms to PUT semantics, which requests that the state of the target resource be created or * replaced with the state defined by the representation enclosed in the request message payload. * * Create a request for the method "routers.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param router Name of the Router resource to update. * @param content the {@link com.google.api.services.compute.model.Router} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String region, java.lang.String router, com.google.api.services.compute.model.Router content) { super(Compute.this, "PUT", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.router = com.google.api.client.util.Preconditions.checkNotNull(router, "Required parameter router must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTER_PATTERN.matcher(router).matches(), "Parameter router must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Update setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the Router resource to update. */ @com.google.api.client.util.Key private java.lang.String router; /** Name of the Router resource to update. */ public java.lang.String getRouter() { return router; } /** Name of the Router resource to update. */ public Update setRouter(java.lang.String router) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTER_PATTERN.matcher(router).matches(), "Parameter router must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.router = router; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Routes collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Routes.List request = compute.routes().list(parameters ...)}
   * 
* * @return the resource collection */ public Routes routes() { return new Routes(); } /** * The "routes" collection of methods. */ public class Routes { /** * Deletes the specified Route resource. * * Create a request for the method "routes.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param route Name of the Route resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String route) throws java.io.IOException { Delete result = new Delete(project, route); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/routes/{route}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ROUTE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified Route resource. * * Create a request for the method "routes.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param route Name of the Route resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String route) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.route = com.google.api.client.util.Preconditions.checkNotNull(route, "Required parameter route must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTE_PATTERN.matcher(route).matches(), "Parameter route must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the Route resource to delete. */ @com.google.api.client.util.Key private java.lang.String route; /** Name of the Route resource to delete. */ public java.lang.String getRoute() { return route; } /** Name of the Route resource to delete. */ public Delete setRoute(java.lang.String route) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTE_PATTERN.matcher(route).matches(), "Parameter route must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.route = route; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified Route resource. * * Create a request for the method "routes.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param route Name of the Route resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String route) throws java.io.IOException { Get result = new Get(project, route); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/routes/{route}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ROUTE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified Route resource. * * Create a request for the method "routes.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param route Name of the Route resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String route) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Route.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.route = com.google.api.client.util.Preconditions.checkNotNull(route, "Required parameter route must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTE_PATTERN.matcher(route).matches(), "Parameter route must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the Route resource to return. */ @com.google.api.client.util.Key private java.lang.String route; /** Name of the Route resource to return. */ public java.lang.String getRoute() { return route; } /** Name of the Route resource to return. */ public Get setRoute(java.lang.String route) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ROUTE_PATTERN.matcher(route).matches(), "Parameter route must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.route = route; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a Route resource in the specified project using the data included in the request. * * Create a request for the method "routes.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Route} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.Route content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/routes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a Route resource in the specified project using the data included in the request. * * Create a request for the method "routes.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Route} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.Route content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of Route resources available to the specified project. * * Create a request for the method "routes.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/routes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of Route resources available to the specified project. * * Create a request for the method "routes.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.RouteList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the SecurityPolicies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.SecurityPolicies.List request = compute.securityPolicies().list(parameters ...)}
   * 
* * @return the resource collection */ public SecurityPolicies securityPolicies() { return new SecurityPolicies(); } /** * The "securityPolicies" collection of methods. */ public class SecurityPolicies { /** * Inserts a rule into a security policy. * * Create a request for the method "securityPolicies.addRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param securityPolicy Name of the security policy to update. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyRule} * @return the request */ public AddRule addRule(java.lang.String project, java.lang.String securityPolicy, com.google.api.services.compute.model.SecurityPolicyRule content) throws java.io.IOException { AddRule result = new AddRule(project, securityPolicy, content); initialize(result); return result; } public class AddRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/securityPolicies/{securityPolicy}/addRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern SECURITY_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Inserts a rule into a security policy. * * Create a request for the method "securityPolicies.addRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param securityPolicy Name of the security policy to update. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyRule} * @since 1.13 */ protected AddRule(java.lang.String project, java.lang.String securityPolicy, com.google.api.services.compute.model.SecurityPolicyRule content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.securityPolicy = com.google.api.client.util.Preconditions.checkNotNull(securityPolicy, "Required parameter securityPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public AddRule set$Xgafv(java.lang.String $Xgafv) { return (AddRule) super.set$Xgafv($Xgafv); } @Override public AddRule setAccessToken(java.lang.String accessToken) { return (AddRule) super.setAccessToken(accessToken); } @Override public AddRule setAlt(java.lang.String alt) { return (AddRule) super.setAlt(alt); } @Override public AddRule setCallback(java.lang.String callback) { return (AddRule) super.setCallback(callback); } @Override public AddRule setFields(java.lang.String fields) { return (AddRule) super.setFields(fields); } @Override public AddRule setKey(java.lang.String key) { return (AddRule) super.setKey(key); } @Override public AddRule setOauthToken(java.lang.String oauthToken) { return (AddRule) super.setOauthToken(oauthToken); } @Override public AddRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddRule) super.setPrettyPrint(prettyPrint); } @Override public AddRule setQuotaUser(java.lang.String quotaUser) { return (AddRule) super.setQuotaUser(quotaUser); } @Override public AddRule setUploadType(java.lang.String uploadType) { return (AddRule) super.setUploadType(uploadType); } @Override public AddRule setUploadProtocol(java.lang.String uploadProtocol) { return (AddRule) super.setUploadProtocol(uploadProtocol); } @Override public AddRule setUserIp(java.lang.String userIp) { return (AddRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the security policy to update. */ @com.google.api.client.util.Key private java.lang.String securityPolicy; /** Name of the security policy to update. */ public java.lang.String getSecurityPolicy() { return securityPolicy; } /** Name of the security policy to update. */ public AddRule setSecurityPolicy(java.lang.String securityPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.securityPolicy = securityPolicy; return this; } /** If true, the request will not be committed. */ @com.google.api.client.util.Key private java.lang.Boolean validateOnly; /** If true, the request will not be committed. */ public java.lang.Boolean getValidateOnly() { return validateOnly; } /** If true, the request will not be committed. */ public AddRule setValidateOnly(java.lang.Boolean validateOnly) { this.validateOnly = validateOnly; return this; } @Override public AddRule set(String parameterName, Object value) { return (AddRule) super.set(parameterName, value); } } /** * Retrieves the list of all SecurityPolicy resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the `returnPartialSuccess` * parameter to `true`. * * Create a request for the method "securityPolicies.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Name of the project scoping this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/securityPolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of all SecurityPolicy resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the * `returnPartialSuccess` parameter to `true`. * * Create a request for the method "securityPolicies.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Name of the project scoping this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SecurityPoliciesAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Name of the project scoping this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Name of the project scoping this request. */ public java.lang.String getProject() { return project; } /** Name of the project scoping this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified policy. * * Create a request for the method "securityPolicies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param securityPolicy Name of the security policy to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String securityPolicy) throws java.io.IOException { Delete result = new Delete(project, securityPolicy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/securityPolicies/{securityPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern SECURITY_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified policy. * * Create a request for the method "securityPolicies.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param securityPolicy Name of the security policy to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String securityPolicy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.securityPolicy = com.google.api.client.util.Preconditions.checkNotNull(securityPolicy, "Required parameter securityPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the security policy to delete. */ @com.google.api.client.util.Key private java.lang.String securityPolicy; /** Name of the security policy to delete. */ public java.lang.String getSecurityPolicy() { return securityPolicy; } /** Name of the security policy to delete. */ public Delete setSecurityPolicy(java.lang.String securityPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.securityPolicy = securityPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * List all of the ordered rules present in a single specified policy. * * Create a request for the method "securityPolicies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param securityPolicy Name of the security policy to get. * @return the request */ public Get get(java.lang.String project, java.lang.String securityPolicy) throws java.io.IOException { Get result = new Get(project, securityPolicy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/securityPolicies/{securityPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern SECURITY_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * List all of the ordered rules present in a single specified policy. * * Create a request for the method "securityPolicies.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param securityPolicy Name of the security policy to get. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String securityPolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SecurityPolicy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.securityPolicy = com.google.api.client.util.Preconditions.checkNotNull(securityPolicy, "Required parameter securityPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the security policy to get. */ @com.google.api.client.util.Key private java.lang.String securityPolicy; /** Name of the security policy to get. */ public java.lang.String getSecurityPolicy() { return securityPolicy; } /** Name of the security policy to get. */ public Get setSecurityPolicy(java.lang.String securityPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.securityPolicy = securityPolicy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets a rule at the specified priority. * * Create a request for the method "securityPolicies.getRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param securityPolicy Name of the security policy to which the queried rule belongs. * @return the request */ public GetRule getRule(java.lang.String project, java.lang.String securityPolicy) throws java.io.IOException { GetRule result = new GetRule(project, securityPolicy); initialize(result); return result; } public class GetRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/securityPolicies/{securityPolicy}/getRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern SECURITY_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets a rule at the specified priority. * * Create a request for the method "securityPolicies.getRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param securityPolicy Name of the security policy to which the queried rule belongs. * @since 1.13 */ protected GetRule(java.lang.String project, java.lang.String securityPolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SecurityPolicyRule.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.securityPolicy = com.google.api.client.util.Preconditions.checkNotNull(securityPolicy, "Required parameter securityPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetRule set$Xgafv(java.lang.String $Xgafv) { return (GetRule) super.set$Xgafv($Xgafv); } @Override public GetRule setAccessToken(java.lang.String accessToken) { return (GetRule) super.setAccessToken(accessToken); } @Override public GetRule setAlt(java.lang.String alt) { return (GetRule) super.setAlt(alt); } @Override public GetRule setCallback(java.lang.String callback) { return (GetRule) super.setCallback(callback); } @Override public GetRule setFields(java.lang.String fields) { return (GetRule) super.setFields(fields); } @Override public GetRule setKey(java.lang.String key) { return (GetRule) super.setKey(key); } @Override public GetRule setOauthToken(java.lang.String oauthToken) { return (GetRule) super.setOauthToken(oauthToken); } @Override public GetRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetRule) super.setPrettyPrint(prettyPrint); } @Override public GetRule setQuotaUser(java.lang.String quotaUser) { return (GetRule) super.setQuotaUser(quotaUser); } @Override public GetRule setUploadType(java.lang.String uploadType) { return (GetRule) super.setUploadType(uploadType); } @Override public GetRule setUploadProtocol(java.lang.String uploadProtocol) { return (GetRule) super.setUploadProtocol(uploadProtocol); } @Override public GetRule setUserIp(java.lang.String userIp) { return (GetRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the security policy to which the queried rule belongs. */ @com.google.api.client.util.Key private java.lang.String securityPolicy; /** Name of the security policy to which the queried rule belongs. */ public java.lang.String getSecurityPolicy() { return securityPolicy; } /** Name of the security policy to which the queried rule belongs. */ public GetRule setSecurityPolicy(java.lang.String securityPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.securityPolicy = securityPolicy; return this; } /** The priority of the rule to get from the security policy. */ @com.google.api.client.util.Key private java.lang.Integer priority; /** The priority of the rule to get from the security policy. */ public java.lang.Integer getPriority() { return priority; } /** The priority of the rule to get from the security policy. */ public GetRule setPriority(java.lang.Integer priority) { this.priority = priority; return this; } @Override public GetRule set(String parameterName, Object value) { return (GetRule) super.set(parameterName, value); } } /** * Creates a new policy in the specified project using the data included in the request. * * Create a request for the method "securityPolicies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.SecurityPolicy} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.SecurityPolicy content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/securityPolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a new policy in the specified project using the data included in the request. * * Create a request for the method "securityPolicies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.SecurityPolicy} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.SecurityPolicy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** If true, the request will not be committed. */ @com.google.api.client.util.Key private java.lang.Boolean validateOnly; /** If true, the request will not be committed. */ public java.lang.Boolean getValidateOnly() { return validateOnly; } /** If true, the request will not be committed. */ public Insert setValidateOnly(java.lang.Boolean validateOnly) { this.validateOnly = validateOnly; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * List all the policies that have been configured for the specified project. * * Create a request for the method "securityPolicies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/securityPolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * List all the policies that have been configured for the specified project. * * Create a request for the method "securityPolicies.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SecurityPolicyList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Gets the current list of preconfigured Web Application Firewall (WAF) expressions. * * Create a request for the method "securityPolicies.listPreconfiguredExpressionSets". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListPreconfiguredExpressionSets#execute()} method to invoke the * remote operation. * * @param project Project ID for this request. * @return the request */ public ListPreconfiguredExpressionSets listPreconfiguredExpressionSets(java.lang.String project) throws java.io.IOException { ListPreconfiguredExpressionSets result = new ListPreconfiguredExpressionSets(project); initialize(result); return result; } public class ListPreconfiguredExpressionSets extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/securityPolicies/listPreconfiguredExpressionSets"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Gets the current list of preconfigured Web Application Firewall (WAF) expressions. * * Create a request for the method "securityPolicies.listPreconfiguredExpressionSets". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListPreconfiguredExpressionSets#execute()} method to invoke the * remote operation.

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

* * @param project Project ID for this request. * @since 1.13 */ protected ListPreconfiguredExpressionSets(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SecurityPoliciesListPreconfiguredExpressionSetsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 ListPreconfiguredExpressionSets set$Xgafv(java.lang.String $Xgafv) { return (ListPreconfiguredExpressionSets) super.set$Xgafv($Xgafv); } @Override public ListPreconfiguredExpressionSets setAccessToken(java.lang.String accessToken) { return (ListPreconfiguredExpressionSets) super.setAccessToken(accessToken); } @Override public ListPreconfiguredExpressionSets setAlt(java.lang.String alt) { return (ListPreconfiguredExpressionSets) super.setAlt(alt); } @Override public ListPreconfiguredExpressionSets setCallback(java.lang.String callback) { return (ListPreconfiguredExpressionSets) super.setCallback(callback); } @Override public ListPreconfiguredExpressionSets setFields(java.lang.String fields) { return (ListPreconfiguredExpressionSets) super.setFields(fields); } @Override public ListPreconfiguredExpressionSets setKey(java.lang.String key) { return (ListPreconfiguredExpressionSets) super.setKey(key); } @Override public ListPreconfiguredExpressionSets setOauthToken(java.lang.String oauthToken) { return (ListPreconfiguredExpressionSets) super.setOauthToken(oauthToken); } @Override public ListPreconfiguredExpressionSets setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListPreconfiguredExpressionSets) super.setPrettyPrint(prettyPrint); } @Override public ListPreconfiguredExpressionSets setQuotaUser(java.lang.String quotaUser) { return (ListPreconfiguredExpressionSets) super.setQuotaUser(quotaUser); } @Override public ListPreconfiguredExpressionSets setUploadType(java.lang.String uploadType) { return (ListPreconfiguredExpressionSets) super.setUploadType(uploadType); } @Override public ListPreconfiguredExpressionSets setUploadProtocol(java.lang.String uploadProtocol) { return (ListPreconfiguredExpressionSets) super.setUploadProtocol(uploadProtocol); } @Override public ListPreconfiguredExpressionSets setUserIp(java.lang.String userIp) { return (ListPreconfiguredExpressionSets) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListPreconfiguredExpressionSets setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListPreconfiguredExpressionSets setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListPreconfiguredExpressionSets setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListPreconfiguredExpressionSets setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListPreconfiguredExpressionSets setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListPreconfiguredExpressionSets setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListPreconfiguredExpressionSets set(String parameterName, Object value) { return (ListPreconfiguredExpressionSets) super.set(parameterName, value); } } /** * Patches the specified policy with the data included in the request. To clear fields in the * policy, leave the fields empty and specify them in the updateMask. This cannot be used to be * update the rules in the policy. Please use the per rule methods like addRule, patchRule, and * removeRule instead. * * Create a request for the method "securityPolicies.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param securityPolicy Name of the security policy to update. * @param content the {@link com.google.api.services.compute.model.SecurityPolicy} * @return the request */ public Patch patch(java.lang.String project, java.lang.String securityPolicy, com.google.api.services.compute.model.SecurityPolicy content) throws java.io.IOException { Patch result = new Patch(project, securityPolicy, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/securityPolicies/{securityPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern SECURITY_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified policy with the data included in the request. To clear fields in the * policy, leave the fields empty and specify them in the updateMask. This cannot be used to be * update the rules in the policy. Please use the per rule methods like addRule, patchRule, and * removeRule instead. * * Create a request for the method "securityPolicies.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param securityPolicy Name of the security policy to update. * @param content the {@link com.google.api.services.compute.model.SecurityPolicy} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String securityPolicy, com.google.api.services.compute.model.SecurityPolicy content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.securityPolicy = com.google.api.client.util.Preconditions.checkNotNull(securityPolicy, "Required parameter securityPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the security policy to update. */ @com.google.api.client.util.Key private java.lang.String securityPolicy; /** Name of the security policy to update. */ public java.lang.String getSecurityPolicy() { return securityPolicy; } /** Name of the security policy to update. */ public Patch setSecurityPolicy(java.lang.String securityPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.securityPolicy = securityPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** Indicates fields to be cleared as part of this request. */ @com.google.api.client.util.Key private String updateMask; /** Indicates fields to be cleared as part of this request. */ public String getUpdateMask() { return updateMask; } /** Indicates fields to be cleared as part of this request. */ public Patch setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Patches a rule at the specified priority. To clear fields in the rule, leave the fields empty and * specify them in the updateMask. * * Create a request for the method "securityPolicies.patchRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link PatchRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param securityPolicy Name of the security policy to update. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyRule} * @return the request */ public PatchRule patchRule(java.lang.String project, java.lang.String securityPolicy, com.google.api.services.compute.model.SecurityPolicyRule content) throws java.io.IOException { PatchRule result = new PatchRule(project, securityPolicy, content); initialize(result); return result; } public class PatchRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/securityPolicies/{securityPolicy}/patchRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern SECURITY_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches a rule at the specified priority. To clear fields in the rule, leave the fields empty * and specify them in the updateMask. * * Create a request for the method "securityPolicies.patchRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link PatchRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param securityPolicy Name of the security policy to update. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyRule} * @since 1.13 */ protected PatchRule(java.lang.String project, java.lang.String securityPolicy, com.google.api.services.compute.model.SecurityPolicyRule content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.securityPolicy = com.google.api.client.util.Preconditions.checkNotNull(securityPolicy, "Required parameter securityPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public PatchRule set$Xgafv(java.lang.String $Xgafv) { return (PatchRule) super.set$Xgafv($Xgafv); } @Override public PatchRule setAccessToken(java.lang.String accessToken) { return (PatchRule) super.setAccessToken(accessToken); } @Override public PatchRule setAlt(java.lang.String alt) { return (PatchRule) super.setAlt(alt); } @Override public PatchRule setCallback(java.lang.String callback) { return (PatchRule) super.setCallback(callback); } @Override public PatchRule setFields(java.lang.String fields) { return (PatchRule) super.setFields(fields); } @Override public PatchRule setKey(java.lang.String key) { return (PatchRule) super.setKey(key); } @Override public PatchRule setOauthToken(java.lang.String oauthToken) { return (PatchRule) super.setOauthToken(oauthToken); } @Override public PatchRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (PatchRule) super.setPrettyPrint(prettyPrint); } @Override public PatchRule setQuotaUser(java.lang.String quotaUser) { return (PatchRule) super.setQuotaUser(quotaUser); } @Override public PatchRule setUploadType(java.lang.String uploadType) { return (PatchRule) super.setUploadType(uploadType); } @Override public PatchRule setUploadProtocol(java.lang.String uploadProtocol) { return (PatchRule) super.setUploadProtocol(uploadProtocol); } @Override public PatchRule setUserIp(java.lang.String userIp) { return (PatchRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public PatchRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the security policy to update. */ @com.google.api.client.util.Key private java.lang.String securityPolicy; /** Name of the security policy to update. */ public java.lang.String getSecurityPolicy() { return securityPolicy; } /** Name of the security policy to update. */ public PatchRule setSecurityPolicy(java.lang.String securityPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.securityPolicy = securityPolicy; return this; } /** The priority of the rule to patch. */ @com.google.api.client.util.Key private java.lang.Integer priority; /** The priority of the rule to patch. */ public java.lang.Integer getPriority() { return priority; } /** The priority of the rule to patch. */ public PatchRule setPriority(java.lang.Integer priority) { this.priority = priority; return this; } /** Indicates fields to be cleared as part of this request. */ @com.google.api.client.util.Key private String updateMask; /** Indicates fields to be cleared as part of this request. */ public String getUpdateMask() { return updateMask; } /** Indicates fields to be cleared as part of this request. */ public PatchRule setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } /** If true, the request will not be committed. */ @com.google.api.client.util.Key private java.lang.Boolean validateOnly; /** If true, the request will not be committed. */ public java.lang.Boolean getValidateOnly() { return validateOnly; } /** If true, the request will not be committed. */ public PatchRule setValidateOnly(java.lang.Boolean validateOnly) { this.validateOnly = validateOnly; return this; } @Override public PatchRule set(String parameterName, Object value) { return (PatchRule) super.set(parameterName, value); } } /** * Deletes a rule at the specified priority. * * Create a request for the method "securityPolicies.removeRule". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RemoveRule#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param securityPolicy Name of the security policy to update. * @return the request */ public RemoveRule removeRule(java.lang.String project, java.lang.String securityPolicy) throws java.io.IOException { RemoveRule result = new RemoveRule(project, securityPolicy); initialize(result); return result; } public class RemoveRule extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/securityPolicies/{securityPolicy}/removeRule"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern SECURITY_POLICY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes a rule at the specified priority. * * Create a request for the method "securityPolicies.removeRule". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RemoveRule#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param securityPolicy Name of the security policy to update. * @since 1.13 */ protected RemoveRule(java.lang.String project, java.lang.String securityPolicy) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.securityPolicy = com.google.api.client.util.Preconditions.checkNotNull(securityPolicy, "Required parameter securityPolicy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public RemoveRule set$Xgafv(java.lang.String $Xgafv) { return (RemoveRule) super.set$Xgafv($Xgafv); } @Override public RemoveRule setAccessToken(java.lang.String accessToken) { return (RemoveRule) super.setAccessToken(accessToken); } @Override public RemoveRule setAlt(java.lang.String alt) { return (RemoveRule) super.setAlt(alt); } @Override public RemoveRule setCallback(java.lang.String callback) { return (RemoveRule) super.setCallback(callback); } @Override public RemoveRule setFields(java.lang.String fields) { return (RemoveRule) super.setFields(fields); } @Override public RemoveRule setKey(java.lang.String key) { return (RemoveRule) super.setKey(key); } @Override public RemoveRule setOauthToken(java.lang.String oauthToken) { return (RemoveRule) super.setOauthToken(oauthToken); } @Override public RemoveRule setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveRule) super.setPrettyPrint(prettyPrint); } @Override public RemoveRule setQuotaUser(java.lang.String quotaUser) { return (RemoveRule) super.setQuotaUser(quotaUser); } @Override public RemoveRule setUploadType(java.lang.String uploadType) { return (RemoveRule) super.setUploadType(uploadType); } @Override public RemoveRule setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveRule) super.setUploadProtocol(uploadProtocol); } @Override public RemoveRule setUserIp(java.lang.String userIp) { return (RemoveRule) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public RemoveRule setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the security policy to update. */ @com.google.api.client.util.Key private java.lang.String securityPolicy; /** Name of the security policy to update. */ public java.lang.String getSecurityPolicy() { return securityPolicy; } /** Name of the security policy to update. */ public RemoveRule setSecurityPolicy(java.lang.String securityPolicy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SECURITY_POLICY_PATTERN.matcher(securityPolicy).matches(), "Parameter securityPolicy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.securityPolicy = securityPolicy; return this; } /** The priority of the rule to remove from the security policy. */ @com.google.api.client.util.Key private java.lang.Integer priority; /** The priority of the rule to remove from the security policy. */ public java.lang.Integer getPriority() { return priority; } /** The priority of the rule to remove from the security policy. */ public RemoveRule setPriority(java.lang.Integer priority) { this.priority = priority; return this; } @Override public RemoveRule set(String parameterName, Object value) { return (RemoveRule) super.set(parameterName, value); } } /** * Sets the labels on a security policy. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "securityPolicies.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/securityPolicies/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on a security policy. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "securityPolicies.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } } /** * An accessor for creating requests from the ServiceAttachments collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.ServiceAttachments.List request = compute.serviceAttachments().list(parameters ...)}
   * 
* * @return the resource collection */ public ServiceAttachments serviceAttachments() { return new ServiceAttachments(); } /** * The "serviceAttachments" collection of methods. */ public class ServiceAttachments { /** * Retrieves the list of all ServiceAttachment resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the `returnPartialSuccess` * parameter to `true`. * * Create a request for the method "serviceAttachments.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Name of the project scoping this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/serviceAttachments"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of all ServiceAttachment resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the * `returnPartialSuccess` parameter to `true`. * * Create a request for the method "serviceAttachments.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Name of the project scoping this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ServiceAttachmentAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Name of the project scoping this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Name of the project scoping this request. */ public java.lang.String getProject() { return project; } /** Name of the project scoping this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified ServiceAttachment in the given scope * * Create a request for the method "serviceAttachments.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region of this request. * @param serviceAttachment Name of the ServiceAttachment resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String serviceAttachment) throws java.io.IOException { Delete result = new Delete(project, region, serviceAttachment); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SERVICE_ATTACHMENT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified ServiceAttachment in the given scope * * Create a request for the method "serviceAttachments.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region of this request. * @param serviceAttachment Name of the ServiceAttachment resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String serviceAttachment) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.serviceAttachment = com.google.api.client.util.Preconditions.checkNotNull(serviceAttachment, "Required parameter serviceAttachment must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SERVICE_ATTACHMENT_PATTERN.matcher(serviceAttachment).matches(), "Parameter serviceAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region of this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region of this request. */ public java.lang.String getRegion() { return region; } /** Name of the region of this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the ServiceAttachment resource to delete. */ @com.google.api.client.util.Key private java.lang.String serviceAttachment; /** Name of the ServiceAttachment resource to delete. */ public java.lang.String getServiceAttachment() { return serviceAttachment; } /** Name of the ServiceAttachment resource to delete. */ public Delete setServiceAttachment(java.lang.String serviceAttachment) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SERVICE_ATTACHMENT_PATTERN.matcher(serviceAttachment).matches(), "Parameter serviceAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.serviceAttachment = serviceAttachment; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified ServiceAttachment resource in the given scope. * * Create a request for the method "serviceAttachments.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region of this request. * @param serviceAttachment Name of the ServiceAttachment resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String serviceAttachment) throws java.io.IOException { Get result = new Get(project, region, serviceAttachment); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SERVICE_ATTACHMENT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified ServiceAttachment resource in the given scope. * * Create a request for the method "serviceAttachments.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region of this request. * @param serviceAttachment Name of the ServiceAttachment resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String serviceAttachment) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ServiceAttachment.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.serviceAttachment = com.google.api.client.util.Preconditions.checkNotNull(serviceAttachment, "Required parameter serviceAttachment must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SERVICE_ATTACHMENT_PATTERN.matcher(serviceAttachment).matches(), "Parameter serviceAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region of this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region of this request. */ public java.lang.String getRegion() { return region; } /** Name of the region of this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the ServiceAttachment resource to return. */ @com.google.api.client.util.Key private java.lang.String serviceAttachment; /** Name of the ServiceAttachment resource to return. */ public java.lang.String getServiceAttachment() { return serviceAttachment; } /** Name of the ServiceAttachment resource to return. */ public Get setServiceAttachment(java.lang.String serviceAttachment) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SERVICE_ATTACHMENT_PATTERN.matcher(serviceAttachment).matches(), "Parameter serviceAttachment must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.serviceAttachment = serviceAttachment; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "serviceAttachments.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, region, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/serviceAttachments/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "serviceAttachments.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public GetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a ServiceAttachment in the specified project in the given scope using the parameters that * are included in the request. * * Create a request for the method "serviceAttachments.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region of this request. * @param content the {@link com.google.api.services.compute.model.ServiceAttachment} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.ServiceAttachment content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/serviceAttachments"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a ServiceAttachment in the specified project in the given scope using the parameters * that are included in the request. * * Create a request for the method "serviceAttachments.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region of this request. * @param content the {@link com.google.api.services.compute.model.ServiceAttachment} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.ServiceAttachment content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region of this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region of this request. */ public java.lang.String getRegion() { return region; } /** Name of the region of this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists the ServiceAttachments for a project in the given scope. * * Create a request for the method "serviceAttachments.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region of this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/serviceAttachments"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Lists the ServiceAttachments for a project in the given scope. * * Create a request for the method "serviceAttachments.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region of this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ServiceAttachmentList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region of this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region of this request. */ public java.lang.String getRegion() { return region; } /** Name of the region of this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified ServiceAttachment resource with the data included in the request. This * method supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "serviceAttachments.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The region scoping this request and should conform to RFC1035. * @param serviceAttachment The resource id of the ServiceAttachment to patch. It should conform to RFC1035 resource name or be * a string form on an unsigned long number. * @param content the {@link com.google.api.services.compute.model.ServiceAttachment} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String serviceAttachment, com.google.api.services.compute.model.ServiceAttachment content) throws java.io.IOException { Patch result = new Patch(project, region, serviceAttachment, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Patches the specified ServiceAttachment resource with the data included in the request. This * method supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "serviceAttachments.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region The region scoping this request and should conform to RFC1035. * @param serviceAttachment The resource id of the ServiceAttachment to patch. It should conform to RFC1035 resource name or be * a string form on an unsigned long number. * @param content the {@link com.google.api.services.compute.model.ServiceAttachment} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String serviceAttachment, com.google.api.services.compute.model.ServiceAttachment content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); this.serviceAttachment = com.google.api.client.util.Preconditions.checkNotNull(serviceAttachment, "Required parameter serviceAttachment must be specified."); } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The region scoping this request and should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String region; /** The region scoping this request and should conform to RFC1035. */ public java.lang.String getRegion() { return region; } /** The region scoping this request and should conform to RFC1035. */ public Patch setRegion(java.lang.String region) { this.region = region; return this; } /** * The resource id of the ServiceAttachment to patch. It should conform to RFC1035 resource * name or be a string form on an unsigned long number. */ @com.google.api.client.util.Key private java.lang.String serviceAttachment; /** The resource id of the ServiceAttachment to patch. It should conform to RFC1035 resource name or be a string form on an unsigned long number. */ public java.lang.String getServiceAttachment() { return serviceAttachment; } /** * The resource id of the ServiceAttachment to patch. It should conform to RFC1035 resource * name or be a string form on an unsigned long number. */ public Patch setServiceAttachment(java.lang.String serviceAttachment) { this.serviceAttachment = serviceAttachment; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "serviceAttachments.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, region, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/serviceAttachments/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "serviceAttachments.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public SetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "serviceAttachments.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, region, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/serviceAttachments/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "serviceAttachments.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public TestIamPermissions setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the SnapshotSettings collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.SnapshotSettings.List request = compute.snapshotSettings().list(parameters ...)}
   * 
* * @return the resource collection */ public SnapshotSettings snapshotSettings() { return new SnapshotSettings(); } /** * The "snapshotSettings" collection of methods. */ public class SnapshotSettings { /** * Get snapshot settings. * * Create a request for the method "snapshotSettings.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public Get get(java.lang.String project) throws java.io.IOException { Get result = new Get(project); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/snapshotSettings"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Get snapshot settings. * * Create a request for the method "snapshotSettings.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected Get(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SnapshotSettings.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Patch snapshot settings. * * Create a request for the method "snapshotSettings.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.SnapshotSettings} * @return the request */ public Patch patch(java.lang.String project, com.google.api.services.compute.model.SnapshotSettings content) throws java.io.IOException { Patch result = new Patch(project, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/snapshotSettings"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Patch snapshot settings. * * Create a request for the method "snapshotSettings.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.SnapshotSettings} * @since 1.13 */ protected Patch(java.lang.String project, com.google.api.services.compute.model.SnapshotSettings content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** update_mask indicates fields to be updated as part of this request. */ @com.google.api.client.util.Key private String updateMask; /** update_mask indicates fields to be updated as part of this request. */ public String getUpdateMask() { return updateMask; } /** update_mask indicates fields to be updated as part of this request. */ public Patch setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Snapshots collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Snapshots.List request = compute.snapshots().list(parameters ...)}
   * 
* * @return the resource collection */ public Snapshots snapshots() { return new Snapshots(); } /** * The "snapshots" collection of methods. */ public class Snapshots { /** * Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not * necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for * deletion is needed for subsequent snapshots, the data will be moved to the next corresponding * snapshot. For more information, see Deleting snapshots. * * Create a request for the method "snapshots.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param snapshot Name of the Snapshot resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String snapshot) throws java.io.IOException { Delete result = new Delete(project, snapshot); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/snapshots/{snapshot}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern SNAPSHOT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not * necessarily delete all the data on that snapshot. If any data on the snapshot that is marked * for deletion is needed for subsequent snapshots, the data will be moved to the next * corresponding snapshot. For more information, see Deleting snapshots. * * Create a request for the method "snapshots.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param snapshot Name of the Snapshot resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String snapshot) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.snapshot = com.google.api.client.util.Preconditions.checkNotNull(snapshot, "Required parameter snapshot must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SNAPSHOT_PATTERN.matcher(snapshot).matches(), "Parameter snapshot must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the Snapshot resource to delete. */ @com.google.api.client.util.Key private java.lang.String snapshot; /** Name of the Snapshot resource to delete. */ public java.lang.String getSnapshot() { return snapshot; } /** Name of the Snapshot resource to delete. */ public Delete setSnapshot(java.lang.String snapshot) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SNAPSHOT_PATTERN.matcher(snapshot).matches(), "Parameter snapshot must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.snapshot = snapshot; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified Snapshot resource. * * Create a request for the method "snapshots.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param snapshot Name of the Snapshot resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String snapshot) throws java.io.IOException { Get result = new Get(project, snapshot); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/snapshots/{snapshot}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern SNAPSHOT_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified Snapshot resource. * * Create a request for the method "snapshots.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param snapshot Name of the Snapshot resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String snapshot) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Snapshot.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.snapshot = com.google.api.client.util.Preconditions.checkNotNull(snapshot, "Required parameter snapshot must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SNAPSHOT_PATTERN.matcher(snapshot).matches(), "Parameter snapshot must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the Snapshot resource to return. */ @com.google.api.client.util.Key private java.lang.String snapshot; /** Name of the Snapshot resource to return. */ public java.lang.String getSnapshot() { return snapshot; } /** Name of the Snapshot resource to return. */ public Get setSnapshot(java.lang.String snapshot) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SNAPSHOT_PATTERN.matcher(snapshot).matches(), "Parameter snapshot must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.snapshot = snapshot; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "snapshots.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/snapshots/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "snapshots.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a snapshot in the specified project using the data included in the request. For regular * snapshot creation, consider using this method instead of disks.createSnapshot, as this method * supports more features, such as creating snapshots in a project different from the source disk * project. * * Create a request for the method "snapshots.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Snapshot} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.Snapshot content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/snapshots"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a snapshot in the specified project using the data included in the request. For regular * snapshot creation, consider using this method instead of disks.createSnapshot, as this method * supports more features, such as creating snapshots in a project different from the source disk * project. * * Create a request for the method "snapshots.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.Snapshot} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.Snapshot content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of Snapshot resources contained within the specified project. * * Create a request for the method "snapshots.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/snapshots"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of Snapshot resources contained within the specified project. * * Create a request for the method "snapshots.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SnapshotList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "snapshots.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/snapshots/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "snapshots.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "snapshots.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/snapshots/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "snapshots.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.GlobalSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.GlobalSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "snapshots.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/snapshots/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "snapshots.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the SslCertificates collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.SslCertificates.List request = compute.sslCertificates().list(parameters ...)}
   * 
* * @return the resource collection */ public SslCertificates sslCertificates() { return new SslCertificates(); } /** * The "sslCertificates" collection of methods. */ public class SslCertificates { /** * Retrieves the list of all SslCertificate resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the `returnPartialSuccess` * parameter to `true`. * * Create a request for the method "sslCertificates.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Name of the project scoping this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/sslCertificates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of all SslCertificate resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the * `returnPartialSuccess` parameter to `true`. * * Create a request for the method "sslCertificates.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Name of the project scoping this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SslCertificateAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Name of the project scoping this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Name of the project scoping this request. */ public java.lang.String getProject() { return project; } /** Name of the project scoping this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified SslCertificate resource. * * Create a request for the method "sslCertificates.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param sslCertificate Name of the SslCertificate resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String sslCertificate) throws java.io.IOException { Delete result = new Delete(project, sslCertificate); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/sslCertificates/{sslCertificate}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern SSL_CERTIFICATE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified SslCertificate resource. * * Create a request for the method "sslCertificates.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param sslCertificate Name of the SslCertificate resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String sslCertificate) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.sslCertificate = com.google.api.client.util.Preconditions.checkNotNull(sslCertificate, "Required parameter sslCertificate must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SSL_CERTIFICATE_PATTERN.matcher(sslCertificate).matches(), "Parameter sslCertificate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the SslCertificate resource to delete. */ @com.google.api.client.util.Key private java.lang.String sslCertificate; /** Name of the SslCertificate resource to delete. */ public java.lang.String getSslCertificate() { return sslCertificate; } /** Name of the SslCertificate resource to delete. */ public Delete setSslCertificate(java.lang.String sslCertificate) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SSL_CERTIFICATE_PATTERN.matcher(sslCertificate).matches(), "Parameter sslCertificate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.sslCertificate = sslCertificate; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified SslCertificate resource. * * Create a request for the method "sslCertificates.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param sslCertificate Name of the SslCertificate resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String sslCertificate) throws java.io.IOException { Get result = new Get(project, sslCertificate); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/sslCertificates/{sslCertificate}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern SSL_CERTIFICATE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified SslCertificate resource. * * Create a request for the method "sslCertificates.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param sslCertificate Name of the SslCertificate resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String sslCertificate) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SslCertificate.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.sslCertificate = com.google.api.client.util.Preconditions.checkNotNull(sslCertificate, "Required parameter sslCertificate must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SSL_CERTIFICATE_PATTERN.matcher(sslCertificate).matches(), "Parameter sslCertificate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the SslCertificate resource to return. */ @com.google.api.client.util.Key private java.lang.String sslCertificate; /** Name of the SslCertificate resource to return. */ public java.lang.String getSslCertificate() { return sslCertificate; } /** Name of the SslCertificate resource to return. */ public Get setSslCertificate(java.lang.String sslCertificate) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SSL_CERTIFICATE_PATTERN.matcher(sslCertificate).matches(), "Parameter sslCertificate must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.sslCertificate = sslCertificate; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a SslCertificate resource in the specified project using the data included in the * request. * * Create a request for the method "sslCertificates.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.SslCertificate} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.SslCertificate content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/sslCertificates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a SslCertificate resource in the specified project using the data included in the * request. * * Create a request for the method "sslCertificates.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.SslCertificate} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.SslCertificate content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of SslCertificate resources available to the specified project. * * Create a request for the method "sslCertificates.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/sslCertificates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of SslCertificate resources available to the specified project. * * Create a request for the method "sslCertificates.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SslCertificateList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the SslPolicies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.SslPolicies.List request = compute.sslPolicies().list(parameters ...)}
   * 
* * @return the resource collection */ public SslPolicies sslPolicies() { return new SslPolicies(); } /** * The "sslPolicies" collection of methods. */ public class SslPolicies { /** * Retrieves the list of all SslPolicy resources, regional and global, available to the specified * project. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter * to `true`. * * Create a request for the method "sslPolicies.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Name of the project scoping this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/sslPolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of all SslPolicy resources, regional and global, available to the specified * project. To prevent failure, Google recommends that you set the `returnPartialSuccess` * parameter to `true`. * * Create a request for the method "sslPolicies.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Name of the project scoping this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SslPoliciesAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Name of the project scoping this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Name of the project scoping this request. */ public java.lang.String getProject() { return project; } /** Name of the project scoping this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use * by any TargetHttpsProxy or TargetSslProxy resources. * * Create a request for the method "sslPolicies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param sslPolicy Name of the SSL policy to delete. The name must be 1-63 characters long, and comply with RFC1035. * @return the request */ public Delete delete(java.lang.String project, java.lang.String sslPolicy) throws java.io.IOException { Delete result = new Delete(project, sslPolicy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/sslPolicies/{sslPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in * use by any TargetHttpsProxy or TargetSslProxy resources. * * Create a request for the method "sslPolicies.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param sslPolicy Name of the SSL policy to delete. The name must be 1-63 characters long, and comply with RFC1035. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String sslPolicy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.sslPolicy = com.google.api.client.util.Preconditions.checkNotNull(sslPolicy, "Required parameter sslPolicy must be specified."); } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the SSL policy to delete. The name must be 1-63 characters long, and comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String sslPolicy; /** Name of the SSL policy to delete. The name must be 1-63 characters long, and comply with RFC1035. */ public java.lang.String getSslPolicy() { return sslPolicy; } /** * Name of the SSL policy to delete. The name must be 1-63 characters long, and comply with * RFC1035. */ public Delete setSslPolicy(java.lang.String sslPolicy) { this.sslPolicy = sslPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Lists all of the ordered rules present in a single specified policy. * * Create a request for the method "sslPolicies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param sslPolicy Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035. * @return the request */ public Get get(java.lang.String project, java.lang.String sslPolicy) throws java.io.IOException { Get result = new Get(project, sslPolicy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/sslPolicies/{sslPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists all of the ordered rules present in a single specified policy. * * Create a request for the method "sslPolicies.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param sslPolicy Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String sslPolicy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SslPolicy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.sslPolicy = com.google.api.client.util.Preconditions.checkNotNull(sslPolicy, "Required parameter sslPolicy must be specified."); } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the SSL policy to update. The name must be 1-63 characters long, and comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String sslPolicy; /** Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035. */ public java.lang.String getSslPolicy() { return sslPolicy; } /** * Name of the SSL policy to update. The name must be 1-63 characters long, and comply with * RFC1035. */ public Get setSslPolicy(java.lang.String sslPolicy) { this.sslPolicy = sslPolicy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Returns the specified SSL policy resource. * * Create a request for the method "sslPolicies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.SslPolicy} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.SslPolicy content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/sslPolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Returns the specified SSL policy resource. * * Create a request for the method "sslPolicies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.SslPolicy} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.SslPolicy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists all the SSL policies that have been configured for the specified project. * * Create a request for the method "sslPolicies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/sslPolicies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists all the SSL policies that have been configured for the specified project. * * Create a request for the method "sslPolicies.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SslPoliciesList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Lists all features that can be specified in the SSL policy when using custom profile. * * Create a request for the method "sslPolicies.listAvailableFeatures". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListAvailableFeatures#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @return the request */ public ListAvailableFeatures listAvailableFeatures(java.lang.String project) throws java.io.IOException { ListAvailableFeatures result = new ListAvailableFeatures(project); initialize(result); return result; } public class ListAvailableFeatures extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/sslPolicies/listAvailableFeatures"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists all features that can be specified in the SSL policy when using custom profile. * * Create a request for the method "sslPolicies.listAvailableFeatures". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListAvailableFeatures#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @since 1.13 */ protected ListAvailableFeatures(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SslPoliciesListAvailableFeaturesResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 ListAvailableFeatures set$Xgafv(java.lang.String $Xgafv) { return (ListAvailableFeatures) super.set$Xgafv($Xgafv); } @Override public ListAvailableFeatures setAccessToken(java.lang.String accessToken) { return (ListAvailableFeatures) super.setAccessToken(accessToken); } @Override public ListAvailableFeatures setAlt(java.lang.String alt) { return (ListAvailableFeatures) super.setAlt(alt); } @Override public ListAvailableFeatures setCallback(java.lang.String callback) { return (ListAvailableFeatures) super.setCallback(callback); } @Override public ListAvailableFeatures setFields(java.lang.String fields) { return (ListAvailableFeatures) super.setFields(fields); } @Override public ListAvailableFeatures setKey(java.lang.String key) { return (ListAvailableFeatures) super.setKey(key); } @Override public ListAvailableFeatures setOauthToken(java.lang.String oauthToken) { return (ListAvailableFeatures) super.setOauthToken(oauthToken); } @Override public ListAvailableFeatures setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListAvailableFeatures) super.setPrettyPrint(prettyPrint); } @Override public ListAvailableFeatures setQuotaUser(java.lang.String quotaUser) { return (ListAvailableFeatures) super.setQuotaUser(quotaUser); } @Override public ListAvailableFeatures setUploadType(java.lang.String uploadType) { return (ListAvailableFeatures) super.setUploadType(uploadType); } @Override public ListAvailableFeatures setUploadProtocol(java.lang.String uploadProtocol) { return (ListAvailableFeatures) super.setUploadProtocol(uploadProtocol); } @Override public ListAvailableFeatures setUserIp(java.lang.String userIp) { return (ListAvailableFeatures) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListAvailableFeatures setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListAvailableFeatures setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListAvailableFeatures setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListAvailableFeatures setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListAvailableFeatures setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListAvailableFeatures setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListAvailableFeatures set(String parameterName, Object value) { return (ListAvailableFeatures) super.set(parameterName, value); } } /** * Patches the specified SSL policy with the data included in the request. * * Create a request for the method "sslPolicies.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param sslPolicy Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.SslPolicy} * @return the request */ public Patch patch(java.lang.String project, java.lang.String sslPolicy, com.google.api.services.compute.model.SslPolicy content) throws java.io.IOException { Patch result = new Patch(project, sslPolicy, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/sslPolicies/{sslPolicy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Patches the specified SSL policy with the data included in the request. * * Create a request for the method "sslPolicies.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param sslPolicy Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.SslPolicy} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String sslPolicy, com.google.api.services.compute.model.SslPolicy content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.sslPolicy = com.google.api.client.util.Preconditions.checkNotNull(sslPolicy, "Required parameter sslPolicy must be specified."); } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the SSL policy to update. The name must be 1-63 characters long, and comply with * RFC1035. */ @com.google.api.client.util.Key private java.lang.String sslPolicy; /** Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035. */ public java.lang.String getSslPolicy() { return sslPolicy; } /** * Name of the SSL policy to update. The name must be 1-63 characters long, and comply with * RFC1035. */ public Patch setSslPolicy(java.lang.String sslPolicy) { this.sslPolicy = sslPolicy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } } /** * An accessor for creating requests from the StoragePoolTypes collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.StoragePoolTypes.List request = compute.storagePoolTypes().list(parameters ...)}
   * 
* * @return the resource collection */ public StoragePoolTypes storagePoolTypes() { return new StoragePoolTypes(); } /** * The "storagePoolTypes" collection of methods. */ public class StoragePoolTypes { /** * Retrieves an aggregated list of storage pool types. To prevent failure, Google recommends that * you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "storagePoolTypes.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/storagePoolTypes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of storage pool types. To prevent failure, Google recommends that * you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "storagePoolTypes.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.StoragePoolTypeAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Returns the specified storage pool type. * * Create a request for the method "storagePoolTypes.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param storagePoolType Name of the storage pool type to return. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String storagePoolType) throws java.io.IOException { Get result = new Get(project, zone, storagePoolType); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/storagePoolTypes/{storagePoolType}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern STORAGE_POOL_TYPE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified storage pool type. * * Create a request for the method "storagePoolTypes.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param storagePoolType Name of the storage pool type to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String storagePoolType) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.StoragePoolType.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.storagePoolType = com.google.api.client.util.Preconditions.checkNotNull(storagePoolType, "Required parameter storagePoolType must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(STORAGE_POOL_TYPE_PATTERN.matcher(storagePoolType).matches(), "Parameter storagePoolType must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the storage pool type to return. */ @com.google.api.client.util.Key private java.lang.String storagePoolType; /** Name of the storage pool type to return. */ public java.lang.String getStoragePoolType() { return storagePoolType; } /** Name of the storage pool type to return. */ public Get setStoragePoolType(java.lang.String storagePoolType) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(STORAGE_POOL_TYPE_PATTERN.matcher(storagePoolType).matches(), "Parameter storagePoolType must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.storagePoolType = storagePoolType; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves a list of storage pool types available to the specified project. * * Create a request for the method "storagePoolTypes.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/storagePoolTypes"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of storage pool types available to the specified project. * * Create a request for the method "storagePoolTypes.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.StoragePoolTypeList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public List setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the StoragePools collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.StoragePools.List request = compute.storagePools().list(parameters ...)}
   * 
* * @return the resource collection */ public StoragePools storagePools() { return new StoragePools(); } /** * The "storagePools" collection of methods. */ public class StoragePools { /** * Retrieves an aggregated list of storage pools. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "storagePools.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/storagePools"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of storage pools. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "storagePools.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.StoragePoolAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified storage pool. Deleting a storagePool removes its data permanently and is * irreversible. However, deleting a storagePool does not delete any snapshots previously made from * the storagePool. You must separately delete snapshots. * * Create a request for the method "storagePools.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param storagePool Name of the storage pool to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String zone, java.lang.String storagePool) throws java.io.IOException { Delete result = new Delete(project, zone, storagePool); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/storagePools/{storagePool}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Deletes the specified storage pool. Deleting a storagePool removes its data permanently and is * irreversible. However, deleting a storagePool does not delete any snapshots previously made * from the storagePool. You must separately delete snapshots. * * Create a request for the method "storagePools.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param storagePool Name of the storage pool to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String zone, java.lang.String storagePool) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.storagePool = com.google.api.client.util.Preconditions.checkNotNull(storagePool, "Required parameter storagePool must be specified."); } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Delete setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the storage pool to delete. */ @com.google.api.client.util.Key private java.lang.String storagePool; /** Name of the storage pool to delete. */ public java.lang.String getStoragePool() { return storagePool; } /** Name of the storage pool to delete. */ public Delete setStoragePool(java.lang.String storagePool) { this.storagePool = storagePool; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns a specified storage pool. Gets a list of available storage pools by making a list() * request. * * Create a request for the method "storagePools.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param storagePool Name of the storage pool to return. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String storagePool) throws java.io.IOException { Get result = new Get(project, zone, storagePool); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/storagePools/{storagePool}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern STORAGE_POOL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns a specified storage pool. Gets a list of available storage pools by making a list() * request. * * Create a request for the method "storagePools.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @param storagePool Name of the storage pool to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String storagePool) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.StoragePool.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.storagePool = com.google.api.client.util.Preconditions.checkNotNull(storagePool, "Required parameter storagePool must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(STORAGE_POOL_PATTERN.matcher(storagePool).matches(), "Parameter storagePool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the storage pool to return. */ @com.google.api.client.util.Key private java.lang.String storagePool; /** Name of the storage pool to return. */ public java.lang.String getStoragePool() { return storagePool; } /** Name of the storage pool to return. */ public Get setStoragePool(java.lang.String storagePool) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(STORAGE_POOL_PATTERN.matcher(storagePool).matches(), "Parameter storagePool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.storagePool = storagePool; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "storagePools.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, zone, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/storagePools/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "storagePools.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public GetIamPolicy setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a storage pool in the specified project using the data in the request. * * Create a request for the method "storagePools.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.StoragePool} * @return the request */ public Insert insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.StoragePool content) throws java.io.IOException { Insert result = new Insert(project, zone, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/storagePools"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a storage pool in the specified project using the data in the request. * * Create a request for the method "storagePools.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param content the {@link com.google.api.services.compute.model.StoragePool} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.StoragePool content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Insert setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of storage pools contained within the specified zone. * * Create a request for the method "storagePools.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/storagePools"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of storage pools contained within the specified zone. * * Create a request for the method "storagePools.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone The name of the zone for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.StoragePoolList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public List setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Lists the disks in a specified storage pool. * * Create a request for the method "storagePools.listDisks". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListDisks#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param storagePool Name of the storage pool to list disks of. * @return the request */ public ListDisks listDisks(java.lang.String project, java.lang.String zone, java.lang.String storagePool) throws java.io.IOException { ListDisks result = new ListDisks(project, zone, storagePool); initialize(result); return result; } public class ListDisks extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/storagePools/{storagePool}/listDisks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern STORAGE_POOL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Lists the disks in a specified storage pool. * * Create a request for the method "storagePools.listDisks". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListDisks#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param storagePool Name of the storage pool to list disks of. * @since 1.13 */ protected ListDisks(java.lang.String project, java.lang.String zone, java.lang.String storagePool) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.StoragePoolListDisks.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.storagePool = com.google.api.client.util.Preconditions.checkNotNull(storagePool, "Required parameter storagePool must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(STORAGE_POOL_PATTERN.matcher(storagePool).matches(), "Parameter storagePool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 ListDisks set$Xgafv(java.lang.String $Xgafv) { return (ListDisks) super.set$Xgafv($Xgafv); } @Override public ListDisks setAccessToken(java.lang.String accessToken) { return (ListDisks) super.setAccessToken(accessToken); } @Override public ListDisks setAlt(java.lang.String alt) { return (ListDisks) super.setAlt(alt); } @Override public ListDisks setCallback(java.lang.String callback) { return (ListDisks) super.setCallback(callback); } @Override public ListDisks setFields(java.lang.String fields) { return (ListDisks) super.setFields(fields); } @Override public ListDisks setKey(java.lang.String key) { return (ListDisks) super.setKey(key); } @Override public ListDisks setOauthToken(java.lang.String oauthToken) { return (ListDisks) super.setOauthToken(oauthToken); } @Override public ListDisks setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListDisks) super.setPrettyPrint(prettyPrint); } @Override public ListDisks setQuotaUser(java.lang.String quotaUser) { return (ListDisks) super.setQuotaUser(quotaUser); } @Override public ListDisks setUploadType(java.lang.String uploadType) { return (ListDisks) super.setUploadType(uploadType); } @Override public ListDisks setUploadProtocol(java.lang.String uploadProtocol) { return (ListDisks) super.setUploadProtocol(uploadProtocol); } @Override public ListDisks setUserIp(java.lang.String userIp) { return (ListDisks) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListDisks setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public ListDisks setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the storage pool to list disks of. */ @com.google.api.client.util.Key private java.lang.String storagePool; /** Name of the storage pool to list disks of. */ public java.lang.String getStoragePool() { return storagePool; } /** Name of the storage pool to list disks of. */ public ListDisks setStoragePool(java.lang.String storagePool) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(STORAGE_POOL_PATTERN.matcher(storagePool).matches(), "Parameter storagePool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.storagePool = storagePool; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListDisks setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListDisks setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListDisks setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListDisks setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListDisks setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListDisks set(String parameterName, Object value) { return (ListDisks) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "storagePools.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, zone, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/storagePools/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "storagePools.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.ZoneSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.ZoneSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public SetIamPolicy setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "storagePools.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, zone, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/storagePools/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "storagePools.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String zone, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public TestIamPermissions setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } /** * Updates the specified storagePool with the data included in the request. The update is performed * only on selected fields included as part of update-mask. Only the following fields can be * modified: pool_provisioned_capacity_gb, pool_provisioned_iops and pool_provisioned_throughput. * * Create a request for the method "storagePools.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param storagePool The storagePool name for this request. * @param content the {@link com.google.api.services.compute.model.StoragePool} * @return the request */ public Update update(java.lang.String project, java.lang.String zone, java.lang.String storagePool, com.google.api.services.compute.model.StoragePool content) throws java.io.IOException { Update result = new Update(project, zone, storagePool, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/storagePools/{storagePool}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern STORAGE_POOL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified storagePool with the data included in the request. The update is * performed only on selected fields included as part of update-mask. Only the following fields * can be modified: pool_provisioned_capacity_gb, pool_provisioned_iops and * pool_provisioned_throughput. * * Create a request for the method "storagePools.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone The name of the zone for this request. * @param storagePool The storagePool name for this request. * @param content the {@link com.google.api.services.compute.model.StoragePool} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String zone, java.lang.String storagePool, com.google.api.services.compute.model.StoragePool content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.storagePool = com.google.api.client.util.Preconditions.checkNotNull(storagePool, "Required parameter storagePool must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(STORAGE_POOL_PATTERN.matcher(storagePool).matches(), "Parameter storagePool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** The name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** The name of the zone for this request. */ public Update setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** The storagePool name for this request. */ @com.google.api.client.util.Key private java.lang.String storagePool; /** The storagePool name for this request. */ public java.lang.String getStoragePool() { return storagePool; } /** The storagePool name for this request. */ public Update setStoragePool(java.lang.String storagePool) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(STORAGE_POOL_PATTERN.matcher(storagePool).matches(), "Parameter storagePool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.storagePool = storagePool; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } /** update_mask indicates fields to be updated as part of this request. */ @com.google.api.client.util.Key private String updateMask; /** update_mask indicates fields to be updated as part of this request. */ public String getUpdateMask() { return updateMask; } /** update_mask indicates fields to be updated as part of this request. */ public Update setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Subnetworks collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Subnetworks.List request = compute.subnetworks().list(parameters ...)}
   * 
* * @return the resource collection */ public Subnetworks subnetworks() { return new Subnetworks(); } /** * The "subnetworks" collection of methods. */ public class Subnetworks { /** * Retrieves an aggregated list of subnetworks. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "subnetworks.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/subnetworks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of subnetworks. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "subnetworks.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SubnetworkAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified subnetwork. * * Create a request for the method "subnetworks.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param subnetwork Name of the Subnetwork resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String subnetwork) throws java.io.IOException { Delete result = new Delete(project, region, subnetwork); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/subnetworks/{subnetwork}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SUBNETWORK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified subnetwork. * * Create a request for the method "subnetworks.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param subnetwork Name of the Subnetwork resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String subnetwork) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.subnetwork = com.google.api.client.util.Preconditions.checkNotNull(subnetwork, "Required parameter subnetwork must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SUBNETWORK_PATTERN.matcher(subnetwork).matches(), "Parameter subnetwork must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the Subnetwork resource to delete. */ @com.google.api.client.util.Key private java.lang.String subnetwork; /** Name of the Subnetwork resource to delete. */ public java.lang.String getSubnetwork() { return subnetwork; } /** Name of the Subnetwork resource to delete. */ public Delete setSubnetwork(java.lang.String subnetwork) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SUBNETWORK_PATTERN.matcher(subnetwork).matches(), "Parameter subnetwork must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.subnetwork = subnetwork; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Expands the IP CIDR range of the subnetwork to a specified value. * * Create a request for the method "subnetworks.expandIpCidrRange". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ExpandIpCidrRange#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param subnetwork Name of the Subnetwork resource to update. * @param content the {@link com.google.api.services.compute.model.SubnetworksExpandIpCidrRangeRequest} * @return the request */ public ExpandIpCidrRange expandIpCidrRange(java.lang.String project, java.lang.String region, java.lang.String subnetwork, com.google.api.services.compute.model.SubnetworksExpandIpCidrRangeRequest content) throws java.io.IOException { ExpandIpCidrRange result = new ExpandIpCidrRange(project, region, subnetwork, content); initialize(result); return result; } public class ExpandIpCidrRange extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SUBNETWORK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Expands the IP CIDR range of the subnetwork to a specified value. * * Create a request for the method "subnetworks.expandIpCidrRange". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ExpandIpCidrRange#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param subnetwork Name of the Subnetwork resource to update. * @param content the {@link com.google.api.services.compute.model.SubnetworksExpandIpCidrRangeRequest} * @since 1.13 */ protected ExpandIpCidrRange(java.lang.String project, java.lang.String region, java.lang.String subnetwork, com.google.api.services.compute.model.SubnetworksExpandIpCidrRangeRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.subnetwork = com.google.api.client.util.Preconditions.checkNotNull(subnetwork, "Required parameter subnetwork must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SUBNETWORK_PATTERN.matcher(subnetwork).matches(), "Parameter subnetwork must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public ExpandIpCidrRange set$Xgafv(java.lang.String $Xgafv) { return (ExpandIpCidrRange) super.set$Xgafv($Xgafv); } @Override public ExpandIpCidrRange setAccessToken(java.lang.String accessToken) { return (ExpandIpCidrRange) super.setAccessToken(accessToken); } @Override public ExpandIpCidrRange setAlt(java.lang.String alt) { return (ExpandIpCidrRange) super.setAlt(alt); } @Override public ExpandIpCidrRange setCallback(java.lang.String callback) { return (ExpandIpCidrRange) super.setCallback(callback); } @Override public ExpandIpCidrRange setFields(java.lang.String fields) { return (ExpandIpCidrRange) super.setFields(fields); } @Override public ExpandIpCidrRange setKey(java.lang.String key) { return (ExpandIpCidrRange) super.setKey(key); } @Override public ExpandIpCidrRange setOauthToken(java.lang.String oauthToken) { return (ExpandIpCidrRange) super.setOauthToken(oauthToken); } @Override public ExpandIpCidrRange setPrettyPrint(java.lang.Boolean prettyPrint) { return (ExpandIpCidrRange) super.setPrettyPrint(prettyPrint); } @Override public ExpandIpCidrRange setQuotaUser(java.lang.String quotaUser) { return (ExpandIpCidrRange) super.setQuotaUser(quotaUser); } @Override public ExpandIpCidrRange setUploadType(java.lang.String uploadType) { return (ExpandIpCidrRange) super.setUploadType(uploadType); } @Override public ExpandIpCidrRange setUploadProtocol(java.lang.String uploadProtocol) { return (ExpandIpCidrRange) super.setUploadProtocol(uploadProtocol); } @Override public ExpandIpCidrRange setUserIp(java.lang.String userIp) { return (ExpandIpCidrRange) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ExpandIpCidrRange setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public ExpandIpCidrRange setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the Subnetwork resource to update. */ @com.google.api.client.util.Key private java.lang.String subnetwork; /** Name of the Subnetwork resource to update. */ public java.lang.String getSubnetwork() { return subnetwork; } /** Name of the Subnetwork resource to update. */ public ExpandIpCidrRange setSubnetwork(java.lang.String subnetwork) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SUBNETWORK_PATTERN.matcher(subnetwork).matches(), "Parameter subnetwork must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.subnetwork = subnetwork; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public ExpandIpCidrRange setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public ExpandIpCidrRange set(String parameterName, Object value) { return (ExpandIpCidrRange) super.set(parameterName, value); } } /** * Returns the specified subnetwork. * * Create a request for the method "subnetworks.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param subnetwork Name of the Subnetwork resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String subnetwork) throws java.io.IOException { Get result = new Get(project, region, subnetwork); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/subnetworks/{subnetwork}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SUBNETWORK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified subnetwork. * * Create a request for the method "subnetworks.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param subnetwork Name of the Subnetwork resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String subnetwork) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Subnetwork.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.subnetwork = com.google.api.client.util.Preconditions.checkNotNull(subnetwork, "Required parameter subnetwork must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SUBNETWORK_PATTERN.matcher(subnetwork).matches(), "Parameter subnetwork must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the Subnetwork resource to return. */ @com.google.api.client.util.Key private java.lang.String subnetwork; /** Name of the Subnetwork resource to return. */ public java.lang.String getSubnetwork() { return subnetwork; } /** Name of the Subnetwork resource to return. */ public Get setSubnetwork(java.lang.String subnetwork) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SUBNETWORK_PATTERN.matcher(subnetwork).matches(), "Parameter subnetwork must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.subnetwork = subnetwork; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * Create a request for the method "subnetworks.getIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(project, region, resource); initialize(result); return result; } public class GetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/subnetworks/{resource}/getIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the access control policy for a resource. May be empty if no such policy or resource * exists. * * Create a request for the method "subnetworks.getIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @since 1.13 */ protected GetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public GetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** Requested IAM Policy version. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** Requested IAM Policy version. */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** Requested IAM Policy version. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a subnetwork in the specified project using the data included in the request. * * Create a request for the method "subnetworks.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.Subnetwork} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Subnetwork content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/subnetworks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a subnetwork in the specified project using the data included in the request. * * Create a request for the method "subnetworks.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.Subnetwork} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.Subnetwork content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of subnetworks available to the specified project. * * Create a request for the method "subnetworks.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/subnetworks"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of subnetworks available to the specified project. * * Create a request for the method "subnetworks.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.SubnetworkList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Retrieves an aggregated list of all usable subnetworks in the project. * * Create a request for the method "subnetworks.listUsable". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link ListUsable#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public ListUsable listUsable(java.lang.String project) throws java.io.IOException { ListUsable result = new ListUsable(project); initialize(result); return result; } public class ListUsable extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/subnetworks/listUsable"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of all usable subnetworks in the project. * * Create a request for the method "subnetworks.listUsable". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link ListUsable#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @since 1.13 */ protected ListUsable(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.UsableSubnetworksAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 ListUsable set$Xgafv(java.lang.String $Xgafv) { return (ListUsable) super.set$Xgafv($Xgafv); } @Override public ListUsable setAccessToken(java.lang.String accessToken) { return (ListUsable) super.setAccessToken(accessToken); } @Override public ListUsable setAlt(java.lang.String alt) { return (ListUsable) super.setAlt(alt); } @Override public ListUsable setCallback(java.lang.String callback) { return (ListUsable) super.setCallback(callback); } @Override public ListUsable setFields(java.lang.String fields) { return (ListUsable) super.setFields(fields); } @Override public ListUsable setKey(java.lang.String key) { return (ListUsable) super.setKey(key); } @Override public ListUsable setOauthToken(java.lang.String oauthToken) { return (ListUsable) super.setOauthToken(oauthToken); } @Override public ListUsable setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListUsable) super.setPrettyPrint(prettyPrint); } @Override public ListUsable setQuotaUser(java.lang.String quotaUser) { return (ListUsable) super.setQuotaUser(quotaUser); } @Override public ListUsable setUploadType(java.lang.String uploadType) { return (ListUsable) super.setUploadType(uploadType); } @Override public ListUsable setUploadProtocol(java.lang.String uploadProtocol) { return (ListUsable) super.setUploadProtocol(uploadProtocol); } @Override public ListUsable setUserIp(java.lang.String userIp) { return (ListUsable) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public ListUsable setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public ListUsable setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public ListUsable setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public ListUsable setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public ListUsable setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public ListUsable setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public ListUsable set(String parameterName, Object value) { return (ListUsable) super.set(parameterName, value); } } /** * Patches the specified subnetwork with the data included in the request. Only certain fields can * be updated with a patch request as indicated in the field descriptions. You must specify the * current fingerprint of the subnetwork resource being patched. * * Create a request for the method "subnetworks.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param subnetwork Name of the Subnetwork resource to patch. * @param content the {@link com.google.api.services.compute.model.Subnetwork} * @return the request */ public Patch patch(java.lang.String project, java.lang.String region, java.lang.String subnetwork, com.google.api.services.compute.model.Subnetwork content) throws java.io.IOException { Patch result = new Patch(project, region, subnetwork, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/subnetworks/{subnetwork}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SUBNETWORK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified subnetwork with the data included in the request. Only certain fields can * be updated with a patch request as indicated in the field descriptions. You must specify the * current fingerprint of the subnetwork resource being patched. * * Create a request for the method "subnetworks.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param subnetwork Name of the Subnetwork resource to patch. * @param content the {@link com.google.api.services.compute.model.Subnetwork} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String region, java.lang.String subnetwork, com.google.api.services.compute.model.Subnetwork content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.subnetwork = com.google.api.client.util.Preconditions.checkNotNull(subnetwork, "Required parameter subnetwork must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SUBNETWORK_PATTERN.matcher(subnetwork).matches(), "Parameter subnetwork must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Patch setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the Subnetwork resource to patch. */ @com.google.api.client.util.Key private java.lang.String subnetwork; /** Name of the Subnetwork resource to patch. */ public java.lang.String getSubnetwork() { return subnetwork; } /** Name of the Subnetwork resource to patch. */ public Patch setSubnetwork(java.lang.String subnetwork) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SUBNETWORK_PATTERN.matcher(subnetwork).matches(), "Parameter subnetwork must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.subnetwork = subnetwork; return this; } /** * The drain timeout specifies the upper bound in seconds on the amount of time allowed to * drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The * drain timeout is only applicable when the following conditions are true: - the subnetwork * being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has * role = BACKUP - the patch request is setting the role to ACTIVE. Note that after this patch * operation the roles of the ACTIVE and BACKUP subnetworks will be swapped. */ @com.google.api.client.util.Key private java.lang.Integer drainTimeoutSeconds; /** The drain timeout specifies the upper bound in seconds on the amount of time allowed to drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The drain timeout is only applicable when the following conditions are true: - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has role = BACKUP - the patch request is setting the role to ACTIVE. Note that after this patch operation the roles of the ACTIVE and BACKUP subnetworks will be swapped. */ public java.lang.Integer getDrainTimeoutSeconds() { return drainTimeoutSeconds; } /** * The drain timeout specifies the upper bound in seconds on the amount of time allowed to * drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The * drain timeout is only applicable when the following conditions are true: - the subnetwork * being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has * role = BACKUP - the patch request is setting the role to ACTIVE. Note that after this patch * operation the roles of the ACTIVE and BACKUP subnetworks will be swapped. */ public Patch setDrainTimeoutSeconds(java.lang.Integer drainTimeoutSeconds) { this.drainTimeoutSeconds = drainTimeoutSeconds; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "subnetworks.setIamPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(project, region, resource, content); initialize(result); return result; } public class SetIamPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/subnetworks/{resource}/setIamPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. * * Create a request for the method "subnetworks.setIamPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetPolicyRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Policy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetIamPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public SetIamPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Set whether VMs in this subnet can access Google services without assigning external IP addresses * through Private Google Access. * * Create a request for the method "subnetworks.setPrivateIpGoogleAccess". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetPrivateIpGoogleAccess#execute()} method to invoke the remote * operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param subnetwork Name of the Subnetwork resource. * @param content the {@link com.google.api.services.compute.model.SubnetworksSetPrivateIpGoogleAccessRequest} * @return the request */ public SetPrivateIpGoogleAccess setPrivateIpGoogleAccess(java.lang.String project, java.lang.String region, java.lang.String subnetwork, com.google.api.services.compute.model.SubnetworksSetPrivateIpGoogleAccessRequest content) throws java.io.IOException { SetPrivateIpGoogleAccess result = new SetPrivateIpGoogleAccess(project, region, subnetwork, content); initialize(result); return result; } public class SetPrivateIpGoogleAccess extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern SUBNETWORK_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Set whether VMs in this subnet can access Google services without assigning external IP * addresses through Private Google Access. * * Create a request for the method "subnetworks.setPrivateIpGoogleAccess". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetPrivateIpGoogleAccess#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param subnetwork Name of the Subnetwork resource. * @param content the {@link com.google.api.services.compute.model.SubnetworksSetPrivateIpGoogleAccessRequest} * @since 1.13 */ protected SetPrivateIpGoogleAccess(java.lang.String project, java.lang.String region, java.lang.String subnetwork, com.google.api.services.compute.model.SubnetworksSetPrivateIpGoogleAccessRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.subnetwork = com.google.api.client.util.Preconditions.checkNotNull(subnetwork, "Required parameter subnetwork must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SUBNETWORK_PATTERN.matcher(subnetwork).matches(), "Parameter subnetwork must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetPrivateIpGoogleAccess set$Xgafv(java.lang.String $Xgafv) { return (SetPrivateIpGoogleAccess) super.set$Xgafv($Xgafv); } @Override public SetPrivateIpGoogleAccess setAccessToken(java.lang.String accessToken) { return (SetPrivateIpGoogleAccess) super.setAccessToken(accessToken); } @Override public SetPrivateIpGoogleAccess setAlt(java.lang.String alt) { return (SetPrivateIpGoogleAccess) super.setAlt(alt); } @Override public SetPrivateIpGoogleAccess setCallback(java.lang.String callback) { return (SetPrivateIpGoogleAccess) super.setCallback(callback); } @Override public SetPrivateIpGoogleAccess setFields(java.lang.String fields) { return (SetPrivateIpGoogleAccess) super.setFields(fields); } @Override public SetPrivateIpGoogleAccess setKey(java.lang.String key) { return (SetPrivateIpGoogleAccess) super.setKey(key); } @Override public SetPrivateIpGoogleAccess setOauthToken(java.lang.String oauthToken) { return (SetPrivateIpGoogleAccess) super.setOauthToken(oauthToken); } @Override public SetPrivateIpGoogleAccess setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetPrivateIpGoogleAccess) super.setPrettyPrint(prettyPrint); } @Override public SetPrivateIpGoogleAccess setQuotaUser(java.lang.String quotaUser) { return (SetPrivateIpGoogleAccess) super.setQuotaUser(quotaUser); } @Override public SetPrivateIpGoogleAccess setUploadType(java.lang.String uploadType) { return (SetPrivateIpGoogleAccess) super.setUploadType(uploadType); } @Override public SetPrivateIpGoogleAccess setUploadProtocol(java.lang.String uploadProtocol) { return (SetPrivateIpGoogleAccess) super.setUploadProtocol(uploadProtocol); } @Override public SetPrivateIpGoogleAccess setUserIp(java.lang.String userIp) { return (SetPrivateIpGoogleAccess) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetPrivateIpGoogleAccess setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public SetPrivateIpGoogleAccess setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the Subnetwork resource. */ @com.google.api.client.util.Key private java.lang.String subnetwork; /** Name of the Subnetwork resource. */ public java.lang.String getSubnetwork() { return subnetwork; } /** Name of the Subnetwork resource. */ public SetPrivateIpGoogleAccess setSubnetwork(java.lang.String subnetwork) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SUBNETWORK_PATTERN.matcher(subnetwork).matches(), "Parameter subnetwork must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.subnetwork = subnetwork; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetPrivateIpGoogleAccess setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetPrivateIpGoogleAccess set(String parameterName, Object value) { return (SetPrivateIpGoogleAccess) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "subnetworks.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, region, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/subnetworks/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "subnetworks.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public TestIamPermissions setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the TargetGrpcProxies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.TargetGrpcProxies.List request = compute.targetGrpcProxies().list(parameters ...)}
   * 
* * @return the resource collection */ public TargetGrpcProxies targetGrpcProxies() { return new TargetGrpcProxies(); } /** * The "targetGrpcProxies" collection of methods. */ public class TargetGrpcProxies { /** * Deletes the specified TargetGrpcProxy in the given scope * * Create a request for the method "targetGrpcProxies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetGrpcProxy Name of the TargetGrpcProxy resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String targetGrpcProxy) throws java.io.IOException { Delete result = new Delete(project, targetGrpcProxy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_GRPC_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified TargetGrpcProxy in the given scope * * Create a request for the method "targetGrpcProxies.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param targetGrpcProxy Name of the TargetGrpcProxy resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String targetGrpcProxy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetGrpcProxy = com.google.api.client.util.Preconditions.checkNotNull(targetGrpcProxy, "Required parameter targetGrpcProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_GRPC_PROXY_PATTERN.matcher(targetGrpcProxy).matches(), "Parameter targetGrpcProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetGrpcProxy resource to delete. */ @com.google.api.client.util.Key private java.lang.String targetGrpcProxy; /** Name of the TargetGrpcProxy resource to delete. */ public java.lang.String getTargetGrpcProxy() { return targetGrpcProxy; } /** Name of the TargetGrpcProxy resource to delete. */ public Delete setTargetGrpcProxy(java.lang.String targetGrpcProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_GRPC_PROXY_PATTERN.matcher(targetGrpcProxy).matches(), "Parameter targetGrpcProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetGrpcProxy = targetGrpcProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified TargetGrpcProxy resource in the given scope. * * Create a request for the method "targetGrpcProxies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetGrpcProxy Name of the TargetGrpcProxy resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String targetGrpcProxy) throws java.io.IOException { Get result = new Get(project, targetGrpcProxy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_GRPC_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified TargetGrpcProxy resource in the given scope. * * Create a request for the method "targetGrpcProxies.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param targetGrpcProxy Name of the TargetGrpcProxy resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String targetGrpcProxy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetGrpcProxy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetGrpcProxy = com.google.api.client.util.Preconditions.checkNotNull(targetGrpcProxy, "Required parameter targetGrpcProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_GRPC_PROXY_PATTERN.matcher(targetGrpcProxy).matches(), "Parameter targetGrpcProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetGrpcProxy resource to return. */ @com.google.api.client.util.Key private java.lang.String targetGrpcProxy; /** Name of the TargetGrpcProxy resource to return. */ public java.lang.String getTargetGrpcProxy() { return targetGrpcProxy; } /** Name of the TargetGrpcProxy resource to return. */ public Get setTargetGrpcProxy(java.lang.String targetGrpcProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_GRPC_PROXY_PATTERN.matcher(targetGrpcProxy).matches(), "Parameter targetGrpcProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetGrpcProxy = targetGrpcProxy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a TargetGrpcProxy in the specified project in the given scope using the parameters that * are included in the request. * * Create a request for the method "targetGrpcProxies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.TargetGrpcProxy} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.TargetGrpcProxy content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetGrpcProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a TargetGrpcProxy in the specified project in the given scope using the parameters that * are included in the request. * * Create a request for the method "targetGrpcProxies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.TargetGrpcProxy} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.TargetGrpcProxy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists the TargetGrpcProxies for a project in the given scope. * * Create a request for the method "targetGrpcProxies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetGrpcProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Lists the TargetGrpcProxies for a project in the given scope. * * Create a request for the method "targetGrpcProxies.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetGrpcProxyList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified TargetGrpcProxy resource with the data included in the request. This method * supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "targetGrpcProxies.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetGrpcProxy Name of the TargetGrpcProxy resource to patch. * @param content the {@link com.google.api.services.compute.model.TargetGrpcProxy} * @return the request */ public Patch patch(java.lang.String project, java.lang.String targetGrpcProxy, com.google.api.services.compute.model.TargetGrpcProxy content) throws java.io.IOException { Patch result = new Patch(project, targetGrpcProxy, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_GRPC_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified TargetGrpcProxy resource with the data included in the request. This * method supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "targetGrpcProxies.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param targetGrpcProxy Name of the TargetGrpcProxy resource to patch. * @param content the {@link com.google.api.services.compute.model.TargetGrpcProxy} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String targetGrpcProxy, com.google.api.services.compute.model.TargetGrpcProxy content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetGrpcProxy = com.google.api.client.util.Preconditions.checkNotNull(targetGrpcProxy, "Required parameter targetGrpcProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_GRPC_PROXY_PATTERN.matcher(targetGrpcProxy).matches(), "Parameter targetGrpcProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetGrpcProxy resource to patch. */ @com.google.api.client.util.Key private java.lang.String targetGrpcProxy; /** Name of the TargetGrpcProxy resource to patch. */ public java.lang.String getTargetGrpcProxy() { return targetGrpcProxy; } /** Name of the TargetGrpcProxy resource to patch. */ public Patch setTargetGrpcProxy(java.lang.String targetGrpcProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_GRPC_PROXY_PATTERN.matcher(targetGrpcProxy).matches(), "Parameter targetGrpcProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetGrpcProxy = targetGrpcProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } } /** * An accessor for creating requests from the TargetHttpProxies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.TargetHttpProxies.List request = compute.targetHttpProxies().list(parameters ...)}
   * 
* * @return the resource collection */ public TargetHttpProxies targetHttpProxies() { return new TargetHttpProxies(); } /** * The "targetHttpProxies" collection of methods. */ public class TargetHttpProxies { /** * Retrieves the list of all TargetHttpProxy resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the `returnPartialSuccess` * parameter to `true`. * * Create a request for the method "targetHttpProxies.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Name of the project scoping this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/targetHttpProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of all TargetHttpProxy resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the * `returnPartialSuccess` parameter to `true`. * * Create a request for the method "targetHttpProxies.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Name of the project scoping this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetHttpProxyAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Name of the project scoping this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Name of the project scoping this request. */ public java.lang.String getProject() { return project; } /** Name of the project scoping this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified TargetHttpProxy resource. * * Create a request for the method "targetHttpProxies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetHttpProxy Name of the TargetHttpProxy resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String targetHttpProxy) throws java.io.IOException { Delete result = new Delete(project, targetHttpProxy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetHttpProxies/{targetHttpProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_HTTP_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified TargetHttpProxy resource. * * Create a request for the method "targetHttpProxies.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param targetHttpProxy Name of the TargetHttpProxy resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String targetHttpProxy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetHttpProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpProxy, "Required parameter targetHttpProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTP_PROXY_PATTERN.matcher(targetHttpProxy).matches(), "Parameter targetHttpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetHttpProxy resource to delete. */ @com.google.api.client.util.Key private java.lang.String targetHttpProxy; /** Name of the TargetHttpProxy resource to delete. */ public java.lang.String getTargetHttpProxy() { return targetHttpProxy; } /** Name of the TargetHttpProxy resource to delete. */ public Delete setTargetHttpProxy(java.lang.String targetHttpProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTP_PROXY_PATTERN.matcher(targetHttpProxy).matches(), "Parameter targetHttpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpProxy = targetHttpProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified TargetHttpProxy resource. * * Create a request for the method "targetHttpProxies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetHttpProxy Name of the TargetHttpProxy resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String targetHttpProxy) throws java.io.IOException { Get result = new Get(project, targetHttpProxy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetHttpProxies/{targetHttpProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_HTTP_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified TargetHttpProxy resource. * * Create a request for the method "targetHttpProxies.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param targetHttpProxy Name of the TargetHttpProxy resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String targetHttpProxy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetHttpProxy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetHttpProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpProxy, "Required parameter targetHttpProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTP_PROXY_PATTERN.matcher(targetHttpProxy).matches(), "Parameter targetHttpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetHttpProxy resource to return. */ @com.google.api.client.util.Key private java.lang.String targetHttpProxy; /** Name of the TargetHttpProxy resource to return. */ public java.lang.String getTargetHttpProxy() { return targetHttpProxy; } /** Name of the TargetHttpProxy resource to return. */ public Get setTargetHttpProxy(java.lang.String targetHttpProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTP_PROXY_PATTERN.matcher(targetHttpProxy).matches(), "Parameter targetHttpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpProxy = targetHttpProxy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a TargetHttpProxy resource in the specified project using the data included in the * request. * * Create a request for the method "targetHttpProxies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.TargetHttpProxy} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.TargetHttpProxy content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetHttpProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a TargetHttpProxy resource in the specified project using the data included in the * request. * * Create a request for the method "targetHttpProxies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.TargetHttpProxy} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.TargetHttpProxy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of TargetHttpProxy resources available to the specified project. * * Create a request for the method "targetHttpProxies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetHttpProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of TargetHttpProxy resources available to the specified project. * * Create a request for the method "targetHttpProxies.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetHttpProxyList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified TargetHttpProxy resource with the data included in the request. This method * supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "targetHttpProxies.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetHttpProxy Name of the TargetHttpProxy resource to patch. * @param content the {@link com.google.api.services.compute.model.TargetHttpProxy} * @return the request */ public Patch patch(java.lang.String project, java.lang.String targetHttpProxy, com.google.api.services.compute.model.TargetHttpProxy content) throws java.io.IOException { Patch result = new Patch(project, targetHttpProxy, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetHttpProxies/{targetHttpProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_HTTP_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified TargetHttpProxy resource with the data included in the request. This * method supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "targetHttpProxies.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param targetHttpProxy Name of the TargetHttpProxy resource to patch. * @param content the {@link com.google.api.services.compute.model.TargetHttpProxy} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String targetHttpProxy, com.google.api.services.compute.model.TargetHttpProxy content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetHttpProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpProxy, "Required parameter targetHttpProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTP_PROXY_PATTERN.matcher(targetHttpProxy).matches(), "Parameter targetHttpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetHttpProxy resource to patch. */ @com.google.api.client.util.Key private java.lang.String targetHttpProxy; /** Name of the TargetHttpProxy resource to patch. */ public java.lang.String getTargetHttpProxy() { return targetHttpProxy; } /** Name of the TargetHttpProxy resource to patch. */ public Patch setTargetHttpProxy(java.lang.String targetHttpProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTP_PROXY_PATTERN.matcher(targetHttpProxy).matches(), "Parameter targetHttpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpProxy = targetHttpProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Changes the URL map for TargetHttpProxy. * * Create a request for the method "targetHttpProxies.setUrlMap". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetUrlMap#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetHttpProxy Name of the TargetHttpProxy to set a URL map for. * @param content the {@link com.google.api.services.compute.model.UrlMapReference} * @return the request */ public SetUrlMap setUrlMap(java.lang.String project, java.lang.String targetHttpProxy, com.google.api.services.compute.model.UrlMapReference content) throws java.io.IOException { SetUrlMap result = new SetUrlMap(project, targetHttpProxy, content); initialize(result); return result; } public class SetUrlMap extends ComputeRequest { private static final String REST_PATH = "projects/{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_HTTP_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Changes the URL map for TargetHttpProxy. * * Create a request for the method "targetHttpProxies.setUrlMap". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetUrlMap#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param targetHttpProxy Name of the TargetHttpProxy to set a URL map for. * @param content the {@link com.google.api.services.compute.model.UrlMapReference} * @since 1.13 */ protected SetUrlMap(java.lang.String project, java.lang.String targetHttpProxy, com.google.api.services.compute.model.UrlMapReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetHttpProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpProxy, "Required parameter targetHttpProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTP_PROXY_PATTERN.matcher(targetHttpProxy).matches(), "Parameter targetHttpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetUrlMap set$Xgafv(java.lang.String $Xgafv) { return (SetUrlMap) super.set$Xgafv($Xgafv); } @Override public SetUrlMap setAccessToken(java.lang.String accessToken) { return (SetUrlMap) super.setAccessToken(accessToken); } @Override public SetUrlMap setAlt(java.lang.String alt) { return (SetUrlMap) super.setAlt(alt); } @Override public SetUrlMap setCallback(java.lang.String callback) { return (SetUrlMap) super.setCallback(callback); } @Override public SetUrlMap setFields(java.lang.String fields) { return (SetUrlMap) super.setFields(fields); } @Override public SetUrlMap setKey(java.lang.String key) { return (SetUrlMap) super.setKey(key); } @Override public SetUrlMap setOauthToken(java.lang.String oauthToken) { return (SetUrlMap) super.setOauthToken(oauthToken); } @Override public SetUrlMap setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetUrlMap) super.setPrettyPrint(prettyPrint); } @Override public SetUrlMap setQuotaUser(java.lang.String quotaUser) { return (SetUrlMap) super.setQuotaUser(quotaUser); } @Override public SetUrlMap setUploadType(java.lang.String uploadType) { return (SetUrlMap) super.setUploadType(uploadType); } @Override public SetUrlMap setUploadProtocol(java.lang.String uploadProtocol) { return (SetUrlMap) super.setUploadProtocol(uploadProtocol); } @Override public SetUrlMap setUserIp(java.lang.String userIp) { return (SetUrlMap) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetUrlMap setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetHttpProxy to set a URL map for. */ @com.google.api.client.util.Key private java.lang.String targetHttpProxy; /** Name of the TargetHttpProxy to set a URL map for. */ public java.lang.String getTargetHttpProxy() { return targetHttpProxy; } /** Name of the TargetHttpProxy to set a URL map for. */ public SetUrlMap setTargetHttpProxy(java.lang.String targetHttpProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTP_PROXY_PATTERN.matcher(targetHttpProxy).matches(), "Parameter targetHttpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpProxy = targetHttpProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetUrlMap setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetUrlMap set(String parameterName, Object value) { return (SetUrlMap) super.set(parameterName, value); } } } /** * An accessor for creating requests from the TargetHttpsProxies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.TargetHttpsProxies.List request = compute.targetHttpsProxies().list(parameters ...)}
   * 
* * @return the resource collection */ public TargetHttpsProxies targetHttpsProxies() { return new TargetHttpsProxies(); } /** * The "targetHttpsProxies" collection of methods. */ public class TargetHttpsProxies { /** * Retrieves the list of all TargetHttpsProxy resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the `returnPartialSuccess` * parameter to `true`. * * Create a request for the method "targetHttpsProxies.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Name of the project scoping this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/targetHttpsProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of all TargetHttpsProxy resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the * `returnPartialSuccess` parameter to `true`. * * Create a request for the method "targetHttpsProxies.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Name of the project scoping this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetHttpsProxyAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Name of the project scoping this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Name of the project scoping this request. */ public java.lang.String getProject() { return project; } /** Name of the project scoping this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified TargetHttpsProxy resource. * * Create a request for the method "targetHttpsProxies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String targetHttpsProxy) throws java.io.IOException { Delete result = new Delete(project, targetHttpsProxy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_HTTPS_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified TargetHttpsProxy resource. * * Create a request for the method "targetHttpsProxies.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String targetHttpsProxy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetHttpsProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpsProxy, "Required parameter targetHttpsProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetHttpsProxy resource to delete. */ @com.google.api.client.util.Key private java.lang.String targetHttpsProxy; /** Name of the TargetHttpsProxy resource to delete. */ public java.lang.String getTargetHttpsProxy() { return targetHttpsProxy; } /** Name of the TargetHttpsProxy resource to delete. */ public Delete setTargetHttpsProxy(java.lang.String targetHttpsProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpsProxy = targetHttpsProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified TargetHttpsProxy resource. * * Create a request for the method "targetHttpsProxies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String targetHttpsProxy) throws java.io.IOException { Get result = new Get(project, targetHttpsProxy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_HTTPS_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified TargetHttpsProxy resource. * * Create a request for the method "targetHttpsProxies.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String targetHttpsProxy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetHttpsProxy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetHttpsProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpsProxy, "Required parameter targetHttpsProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetHttpsProxy resource to return. */ @com.google.api.client.util.Key private java.lang.String targetHttpsProxy; /** Name of the TargetHttpsProxy resource to return. */ public java.lang.String getTargetHttpsProxy() { return targetHttpsProxy; } /** Name of the TargetHttpsProxy resource to return. */ public Get setTargetHttpsProxy(java.lang.String targetHttpsProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpsProxy = targetHttpsProxy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a TargetHttpsProxy resource in the specified project using the data included in the * request. * * Create a request for the method "targetHttpsProxies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.TargetHttpsProxy} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.TargetHttpsProxy content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetHttpsProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a TargetHttpsProxy resource in the specified project using the data included in the * request. * * Create a request for the method "targetHttpsProxies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.TargetHttpsProxy} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.TargetHttpsProxy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of TargetHttpsProxy resources available to the specified project. * * Create a request for the method "targetHttpsProxies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetHttpsProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of TargetHttpsProxy resources available to the specified project. * * Create a request for the method "targetHttpsProxies.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetHttpsProxyList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified TargetHttpsProxy resource with the data included in the request. This * method supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "targetHttpsProxies.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to patch. * @param content the {@link com.google.api.services.compute.model.TargetHttpsProxy} * @return the request */ public Patch patch(java.lang.String project, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.TargetHttpsProxy content) throws java.io.IOException { Patch result = new Patch(project, targetHttpsProxy, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_HTTPS_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified TargetHttpsProxy resource with the data included in the request. This * method supports PATCH semantics and uses JSON merge patch format and processing rules. * * Create a request for the method "targetHttpsProxies.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to patch. * @param content the {@link com.google.api.services.compute.model.TargetHttpsProxy} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.TargetHttpsProxy content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetHttpsProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpsProxy, "Required parameter targetHttpsProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetHttpsProxy resource to patch. */ @com.google.api.client.util.Key private java.lang.String targetHttpsProxy; /** Name of the TargetHttpsProxy resource to patch. */ public java.lang.String getTargetHttpsProxy() { return targetHttpsProxy; } /** Name of the TargetHttpsProxy resource to patch. */ public Patch setTargetHttpsProxy(java.lang.String targetHttpsProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpsProxy = targetHttpsProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Changes the Certificate Map for TargetHttpsProxy. * * Create a request for the method "targetHttpsProxies.setCertificateMap". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetCertificateMap#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource whose CertificateMap is to be set. The name must be 1-63 * characters long, and comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.TargetHttpsProxiesSetCertificateMapRequest} * @return the request */ public SetCertificateMap setCertificateMap(java.lang.String project, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.TargetHttpsProxiesSetCertificateMapRequest content) throws java.io.IOException { SetCertificateMap result = new SetCertificateMap(project, targetHttpsProxy, content); initialize(result); return result; } public class SetCertificateMap extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setCertificateMap"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Changes the Certificate Map for TargetHttpsProxy. * * Create a request for the method "targetHttpsProxies.setCertificateMap". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetCertificateMap#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource whose CertificateMap is to be set. The name must be 1-63 * characters long, and comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.TargetHttpsProxiesSetCertificateMapRequest} * @since 1.13 */ protected SetCertificateMap(java.lang.String project, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.TargetHttpsProxiesSetCertificateMapRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetHttpsProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpsProxy, "Required parameter targetHttpsProxy must be specified."); } @Override public SetCertificateMap set$Xgafv(java.lang.String $Xgafv) { return (SetCertificateMap) super.set$Xgafv($Xgafv); } @Override public SetCertificateMap setAccessToken(java.lang.String accessToken) { return (SetCertificateMap) super.setAccessToken(accessToken); } @Override public SetCertificateMap setAlt(java.lang.String alt) { return (SetCertificateMap) super.setAlt(alt); } @Override public SetCertificateMap setCallback(java.lang.String callback) { return (SetCertificateMap) super.setCallback(callback); } @Override public SetCertificateMap setFields(java.lang.String fields) { return (SetCertificateMap) super.setFields(fields); } @Override public SetCertificateMap setKey(java.lang.String key) { return (SetCertificateMap) super.setKey(key); } @Override public SetCertificateMap setOauthToken(java.lang.String oauthToken) { return (SetCertificateMap) super.setOauthToken(oauthToken); } @Override public SetCertificateMap setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetCertificateMap) super.setPrettyPrint(prettyPrint); } @Override public SetCertificateMap setQuotaUser(java.lang.String quotaUser) { return (SetCertificateMap) super.setQuotaUser(quotaUser); } @Override public SetCertificateMap setUploadType(java.lang.String uploadType) { return (SetCertificateMap) super.setUploadType(uploadType); } @Override public SetCertificateMap setUploadProtocol(java.lang.String uploadProtocol) { return (SetCertificateMap) super.setUploadProtocol(uploadProtocol); } @Override public SetCertificateMap setUserIp(java.lang.String userIp) { return (SetCertificateMap) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetCertificateMap setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the TargetHttpsProxy resource whose CertificateMap is to be set. The name must be * 1-63 characters long, and comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String targetHttpsProxy; /** Name of the TargetHttpsProxy resource whose CertificateMap is to be set. The name must be 1-63 characters long, and comply with RFC1035. */ public java.lang.String getTargetHttpsProxy() { return targetHttpsProxy; } /** * Name of the TargetHttpsProxy resource whose CertificateMap is to be set. The name must be * 1-63 characters long, and comply with RFC1035. */ public SetCertificateMap setTargetHttpsProxy(java.lang.String targetHttpsProxy) { this.targetHttpsProxy = targetHttpsProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetCertificateMap setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetCertificateMap set(String parameterName, Object value) { return (SetCertificateMap) super.set(parameterName, value); } } /** * Sets the QUIC override policy for TargetHttpsProxy. * * Create a request for the method "targetHttpsProxies.setQuicOverride". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetQuicOverride#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to set the QUIC override policy for. The name should conform * to RFC1035. * @param content the {@link com.google.api.services.compute.model.TargetHttpsProxiesSetQuicOverrideRequest} * @return the request */ public SetQuicOverride setQuicOverride(java.lang.String project, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.TargetHttpsProxiesSetQuicOverrideRequest content) throws java.io.IOException { SetQuicOverride result = new SetQuicOverride(project, targetHttpsProxy, content); initialize(result); return result; } public class SetQuicOverride extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setQuicOverride"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Sets the QUIC override policy for TargetHttpsProxy. * * Create a request for the method "targetHttpsProxies.setQuicOverride". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetQuicOverride#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to set the QUIC override policy for. The name should conform * to RFC1035. * @param content the {@link com.google.api.services.compute.model.TargetHttpsProxiesSetQuicOverrideRequest} * @since 1.13 */ protected SetQuicOverride(java.lang.String project, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.TargetHttpsProxiesSetQuicOverrideRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetHttpsProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpsProxy, "Required parameter targetHttpsProxy must be specified."); } @Override public SetQuicOverride set$Xgafv(java.lang.String $Xgafv) { return (SetQuicOverride) super.set$Xgafv($Xgafv); } @Override public SetQuicOverride setAccessToken(java.lang.String accessToken) { return (SetQuicOverride) super.setAccessToken(accessToken); } @Override public SetQuicOverride setAlt(java.lang.String alt) { return (SetQuicOverride) super.setAlt(alt); } @Override public SetQuicOverride setCallback(java.lang.String callback) { return (SetQuicOverride) super.setCallback(callback); } @Override public SetQuicOverride setFields(java.lang.String fields) { return (SetQuicOverride) super.setFields(fields); } @Override public SetQuicOverride setKey(java.lang.String key) { return (SetQuicOverride) super.setKey(key); } @Override public SetQuicOverride setOauthToken(java.lang.String oauthToken) { return (SetQuicOverride) super.setOauthToken(oauthToken); } @Override public SetQuicOverride setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetQuicOverride) super.setPrettyPrint(prettyPrint); } @Override public SetQuicOverride setQuotaUser(java.lang.String quotaUser) { return (SetQuicOverride) super.setQuotaUser(quotaUser); } @Override public SetQuicOverride setUploadType(java.lang.String uploadType) { return (SetQuicOverride) super.setUploadType(uploadType); } @Override public SetQuicOverride setUploadProtocol(java.lang.String uploadProtocol) { return (SetQuicOverride) super.setUploadProtocol(uploadProtocol); } @Override public SetQuicOverride setUserIp(java.lang.String userIp) { return (SetQuicOverride) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetQuicOverride setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the TargetHttpsProxy resource to set the QUIC override policy for. The name should * conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String targetHttpsProxy; /** Name of the TargetHttpsProxy resource to set the QUIC override policy for. The name should conform to RFC1035. */ public java.lang.String getTargetHttpsProxy() { return targetHttpsProxy; } /** * Name of the TargetHttpsProxy resource to set the QUIC override policy for. The name should * conform to RFC1035. */ public SetQuicOverride setTargetHttpsProxy(java.lang.String targetHttpsProxy) { this.targetHttpsProxy = targetHttpsProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetQuicOverride setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetQuicOverride set(String parameterName, Object value) { return (SetQuicOverride) super.set(parameterName, value); } } /** * Replaces SslCertificates for TargetHttpsProxy. * * Create a request for the method "targetHttpsProxies.setSslCertificates". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetSslCertificates#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to set an SslCertificates resource for. * @param content the {@link com.google.api.services.compute.model.TargetHttpsProxiesSetSslCertificatesRequest} * @return the request */ public SetSslCertificates setSslCertificates(java.lang.String project, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.TargetHttpsProxiesSetSslCertificatesRequest content) throws java.io.IOException { SetSslCertificates result = new SetSslCertificates(project, targetHttpsProxy, content); initialize(result); return result; } public class SetSslCertificates extends ComputeRequest { private static final String REST_PATH = "projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_HTTPS_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Replaces SslCertificates for TargetHttpsProxy. * * Create a request for the method "targetHttpsProxies.setSslCertificates". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetSslCertificates#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource to set an SslCertificates resource for. * @param content the {@link com.google.api.services.compute.model.TargetHttpsProxiesSetSslCertificatesRequest} * @since 1.13 */ protected SetSslCertificates(java.lang.String project, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.TargetHttpsProxiesSetSslCertificatesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetHttpsProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpsProxy, "Required parameter targetHttpsProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetSslCertificates set$Xgafv(java.lang.String $Xgafv) { return (SetSslCertificates) super.set$Xgafv($Xgafv); } @Override public SetSslCertificates setAccessToken(java.lang.String accessToken) { return (SetSslCertificates) super.setAccessToken(accessToken); } @Override public SetSslCertificates setAlt(java.lang.String alt) { return (SetSslCertificates) super.setAlt(alt); } @Override public SetSslCertificates setCallback(java.lang.String callback) { return (SetSslCertificates) super.setCallback(callback); } @Override public SetSslCertificates setFields(java.lang.String fields) { return (SetSslCertificates) super.setFields(fields); } @Override public SetSslCertificates setKey(java.lang.String key) { return (SetSslCertificates) super.setKey(key); } @Override public SetSslCertificates setOauthToken(java.lang.String oauthToken) { return (SetSslCertificates) super.setOauthToken(oauthToken); } @Override public SetSslCertificates setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetSslCertificates) super.setPrettyPrint(prettyPrint); } @Override public SetSslCertificates setQuotaUser(java.lang.String quotaUser) { return (SetSslCertificates) super.setQuotaUser(quotaUser); } @Override public SetSslCertificates setUploadType(java.lang.String uploadType) { return (SetSslCertificates) super.setUploadType(uploadType); } @Override public SetSslCertificates setUploadProtocol(java.lang.String uploadProtocol) { return (SetSslCertificates) super.setUploadProtocol(uploadProtocol); } @Override public SetSslCertificates setUserIp(java.lang.String userIp) { return (SetSslCertificates) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetSslCertificates setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetHttpsProxy resource to set an SslCertificates resource for. */ @com.google.api.client.util.Key private java.lang.String targetHttpsProxy; /** Name of the TargetHttpsProxy resource to set an SslCertificates resource for. */ public java.lang.String getTargetHttpsProxy() { return targetHttpsProxy; } /** Name of the TargetHttpsProxy resource to set an SslCertificates resource for. */ public SetSslCertificates setTargetHttpsProxy(java.lang.String targetHttpsProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpsProxy = targetHttpsProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetSslCertificates setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetSslCertificates set(String parameterName, Object value) { return (SetSslCertificates) super.set(parameterName, value); } } /** * Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for * SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do * not affect the connection between the load balancer and the backends. * * Create a request for the method "targetHttpsProxies.setSslPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetSslPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource whose SSL policy is to be set. The name must be 1-63 * characters long, and comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.SslPolicyReference} * @return the request */ public SetSslPolicy setSslPolicy(java.lang.String project, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.SslPolicyReference content) throws java.io.IOException { SetSslPolicy result = new SetSslPolicy(project, targetHttpsProxy, content); initialize(result); return result; } public class SetSslPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setSslPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for * SSL features. This affects connections between clients and the HTTPS proxy load balancer. They * do not affect the connection between the load balancer and the backends. * * Create a request for the method "targetHttpsProxies.setSslPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetSslPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource whose SSL policy is to be set. The name must be 1-63 * characters long, and comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.SslPolicyReference} * @since 1.13 */ protected SetSslPolicy(java.lang.String project, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.SslPolicyReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetHttpsProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpsProxy, "Required parameter targetHttpsProxy must be specified."); } @Override public SetSslPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetSslPolicy) super.set$Xgafv($Xgafv); } @Override public SetSslPolicy setAccessToken(java.lang.String accessToken) { return (SetSslPolicy) super.setAccessToken(accessToken); } @Override public SetSslPolicy setAlt(java.lang.String alt) { return (SetSslPolicy) super.setAlt(alt); } @Override public SetSslPolicy setCallback(java.lang.String callback) { return (SetSslPolicy) super.setCallback(callback); } @Override public SetSslPolicy setFields(java.lang.String fields) { return (SetSslPolicy) super.setFields(fields); } @Override public SetSslPolicy setKey(java.lang.String key) { return (SetSslPolicy) super.setKey(key); } @Override public SetSslPolicy setOauthToken(java.lang.String oauthToken) { return (SetSslPolicy) super.setOauthToken(oauthToken); } @Override public SetSslPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetSslPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetSslPolicy setQuotaUser(java.lang.String quotaUser) { return (SetSslPolicy) super.setQuotaUser(quotaUser); } @Override public SetSslPolicy setUploadType(java.lang.String uploadType) { return (SetSslPolicy) super.setUploadType(uploadType); } @Override public SetSslPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetSslPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetSslPolicy setUserIp(java.lang.String userIp) { return (SetSslPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetSslPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the TargetHttpsProxy resource whose SSL policy is to be set. The name must be 1-63 * characters long, and comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String targetHttpsProxy; /** Name of the TargetHttpsProxy resource whose SSL policy is to be set. The name must be 1-63 characters long, and comply with RFC1035. */ public java.lang.String getTargetHttpsProxy() { return targetHttpsProxy; } /** * Name of the TargetHttpsProxy resource whose SSL policy is to be set. The name must be 1-63 * characters long, and comply with RFC1035. */ public SetSslPolicy setTargetHttpsProxy(java.lang.String targetHttpsProxy) { this.targetHttpsProxy = targetHttpsProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetSslPolicy setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetSslPolicy set(String parameterName, Object value) { return (SetSslPolicy) super.set(parameterName, value); } } /** * Changes the URL map for TargetHttpsProxy. * * Create a request for the method "targetHttpsProxies.setUrlMap". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetUrlMap#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource whose URL map is to be set. * @param content the {@link com.google.api.services.compute.model.UrlMapReference} * @return the request */ public SetUrlMap setUrlMap(java.lang.String project, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.UrlMapReference content) throws java.io.IOException { SetUrlMap result = new SetUrlMap(project, targetHttpsProxy, content); initialize(result); return result; } public class SetUrlMap extends ComputeRequest { private static final String REST_PATH = "projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_HTTPS_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Changes the URL map for TargetHttpsProxy. * * Create a request for the method "targetHttpsProxies.setUrlMap". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetUrlMap#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param targetHttpsProxy Name of the TargetHttpsProxy resource whose URL map is to be set. * @param content the {@link com.google.api.services.compute.model.UrlMapReference} * @since 1.13 */ protected SetUrlMap(java.lang.String project, java.lang.String targetHttpsProxy, com.google.api.services.compute.model.UrlMapReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetHttpsProxy = com.google.api.client.util.Preconditions.checkNotNull(targetHttpsProxy, "Required parameter targetHttpsProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetUrlMap set$Xgafv(java.lang.String $Xgafv) { return (SetUrlMap) super.set$Xgafv($Xgafv); } @Override public SetUrlMap setAccessToken(java.lang.String accessToken) { return (SetUrlMap) super.setAccessToken(accessToken); } @Override public SetUrlMap setAlt(java.lang.String alt) { return (SetUrlMap) super.setAlt(alt); } @Override public SetUrlMap setCallback(java.lang.String callback) { return (SetUrlMap) super.setCallback(callback); } @Override public SetUrlMap setFields(java.lang.String fields) { return (SetUrlMap) super.setFields(fields); } @Override public SetUrlMap setKey(java.lang.String key) { return (SetUrlMap) super.setKey(key); } @Override public SetUrlMap setOauthToken(java.lang.String oauthToken) { return (SetUrlMap) super.setOauthToken(oauthToken); } @Override public SetUrlMap setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetUrlMap) super.setPrettyPrint(prettyPrint); } @Override public SetUrlMap setQuotaUser(java.lang.String quotaUser) { return (SetUrlMap) super.setQuotaUser(quotaUser); } @Override public SetUrlMap setUploadType(java.lang.String uploadType) { return (SetUrlMap) super.setUploadType(uploadType); } @Override public SetUrlMap setUploadProtocol(java.lang.String uploadProtocol) { return (SetUrlMap) super.setUploadProtocol(uploadProtocol); } @Override public SetUrlMap setUserIp(java.lang.String userIp) { return (SetUrlMap) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetUrlMap setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetHttpsProxy resource whose URL map is to be set. */ @com.google.api.client.util.Key private java.lang.String targetHttpsProxy; /** Name of the TargetHttpsProxy resource whose URL map is to be set. */ public java.lang.String getTargetHttpsProxy() { return targetHttpsProxy; } /** Name of the TargetHttpsProxy resource whose URL map is to be set. */ public SetUrlMap setTargetHttpsProxy(java.lang.String targetHttpsProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_HTTPS_PROXY_PATTERN.matcher(targetHttpsProxy).matches(), "Parameter targetHttpsProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetHttpsProxy = targetHttpsProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetUrlMap setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetUrlMap set(String parameterName, Object value) { return (SetUrlMap) super.set(parameterName, value); } } } /** * An accessor for creating requests from the TargetInstances collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.TargetInstances.List request = compute.targetInstances().list(parameters ...)}
   * 
* * @return the resource collection */ public TargetInstances targetInstances() { return new TargetInstances(); } /** * The "targetInstances" collection of methods. */ public class TargetInstances { /** * Retrieves an aggregated list of target instances. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "targetInstances.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/targetInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of target instances. To prevent failure, Google recommends that * you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "targetInstances.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetInstanceAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified TargetInstance resource. * * Create a request for the method "targetInstances.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone scoping this request. * @param targetInstance Name of the TargetInstance resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String zone, java.lang.String targetInstance) throws java.io.IOException { Delete result = new Delete(project, zone, targetInstance); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/targetInstances/{targetInstance}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified TargetInstance resource. * * Create a request for the method "targetInstances.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone scoping this request. * @param targetInstance Name of the TargetInstance resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String zone, java.lang.String targetInstance) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetInstance = com.google.api.client.util.Preconditions.checkNotNull(targetInstance, "Required parameter targetInstance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_INSTANCE_PATTERN.matcher(targetInstance).matches(), "Parameter targetInstance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone scoping this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone scoping this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone scoping this request. */ public Delete setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the TargetInstance resource to delete. */ @com.google.api.client.util.Key private java.lang.String targetInstance; /** Name of the TargetInstance resource to delete. */ public java.lang.String getTargetInstance() { return targetInstance; } /** Name of the TargetInstance resource to delete. */ public Delete setTargetInstance(java.lang.String targetInstance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_INSTANCE_PATTERN.matcher(targetInstance).matches(), "Parameter targetInstance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetInstance = targetInstance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified TargetInstance resource. * * Create a request for the method "targetInstances.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone scoping this request. * @param targetInstance Name of the TargetInstance resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String targetInstance) throws java.io.IOException { Get result = new Get(project, zone, targetInstance); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/targetInstances/{targetInstance}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_INSTANCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified TargetInstance resource. * * Create a request for the method "targetInstances.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone scoping this request. * @param targetInstance Name of the TargetInstance resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String targetInstance) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetInstance.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetInstance = com.google.api.client.util.Preconditions.checkNotNull(targetInstance, "Required parameter targetInstance must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_INSTANCE_PATTERN.matcher(targetInstance).matches(), "Parameter targetInstance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone scoping this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone scoping this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone scoping this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the TargetInstance resource to return. */ @com.google.api.client.util.Key private java.lang.String targetInstance; /** Name of the TargetInstance resource to return. */ public java.lang.String getTargetInstance() { return targetInstance; } /** Name of the TargetInstance resource to return. */ public Get setTargetInstance(java.lang.String targetInstance) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_INSTANCE_PATTERN.matcher(targetInstance).matches(), "Parameter targetInstance must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetInstance = targetInstance; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a TargetInstance resource in the specified project and zone using the data included in * the request. * * Create a request for the method "targetInstances.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone scoping this request. * @param content the {@link com.google.api.services.compute.model.TargetInstance} * @return the request */ public Insert insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.TargetInstance content) throws java.io.IOException { Insert result = new Insert(project, zone, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/targetInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a TargetInstance resource in the specified project and zone using the data included in * the request. * * Create a request for the method "targetInstances.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone Name of the zone scoping this request. * @param content the {@link com.google.api.services.compute.model.TargetInstance} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String zone, com.google.api.services.compute.model.TargetInstance content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone scoping this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone scoping this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone scoping this request. */ public Insert setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of TargetInstance resources available to the specified project and zone. * * Create a request for the method "targetInstances.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/targetInstances"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of TargetInstance resources available to the specified project and zone. * * Create a request for the method "targetInstances.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetInstanceList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone scoping this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone scoping this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone scoping this request. */ public List setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Sets the Google Cloud Armor security policy for the specified target instance. For more * information, see Google Cloud Armor Overview * * Create a request for the method "targetInstances.setSecurityPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetSecurityPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone scoping this request. * @param targetInstance Name of the TargetInstance resource to which the security policy should be set. The name should * conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyReference} * @return the request */ public SetSecurityPolicy setSecurityPolicy(java.lang.String project, java.lang.String zone, java.lang.String targetInstance, com.google.api.services.compute.model.SecurityPolicyReference content) throws java.io.IOException { SetSecurityPolicy result = new SetSecurityPolicy(project, zone, targetInstance, content); initialize(result); return result; } public class SetSecurityPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Sets the Google Cloud Armor security policy for the specified target instance. For more * information, see Google Cloud Armor Overview * * Create a request for the method "targetInstances.setSecurityPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetSecurityPolicy#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param zone Name of the zone scoping this request. * @param targetInstance Name of the TargetInstance resource to which the security policy should be set. The name should * conform to RFC1035. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyReference} * @since 1.13 */ protected SetSecurityPolicy(java.lang.String project, java.lang.String zone, java.lang.String targetInstance, com.google.api.services.compute.model.SecurityPolicyReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetInstance = com.google.api.client.util.Preconditions.checkNotNull(targetInstance, "Required parameter targetInstance must be specified."); } @Override public SetSecurityPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetSecurityPolicy) super.set$Xgafv($Xgafv); } @Override public SetSecurityPolicy setAccessToken(java.lang.String accessToken) { return (SetSecurityPolicy) super.setAccessToken(accessToken); } @Override public SetSecurityPolicy setAlt(java.lang.String alt) { return (SetSecurityPolicy) super.setAlt(alt); } @Override public SetSecurityPolicy setCallback(java.lang.String callback) { return (SetSecurityPolicy) super.setCallback(callback); } @Override public SetSecurityPolicy setFields(java.lang.String fields) { return (SetSecurityPolicy) super.setFields(fields); } @Override public SetSecurityPolicy setKey(java.lang.String key) { return (SetSecurityPolicy) super.setKey(key); } @Override public SetSecurityPolicy setOauthToken(java.lang.String oauthToken) { return (SetSecurityPolicy) super.setOauthToken(oauthToken); } @Override public SetSecurityPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetSecurityPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetSecurityPolicy setQuotaUser(java.lang.String quotaUser) { return (SetSecurityPolicy) super.setQuotaUser(quotaUser); } @Override public SetSecurityPolicy setUploadType(java.lang.String uploadType) { return (SetSecurityPolicy) super.setUploadType(uploadType); } @Override public SetSecurityPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetSecurityPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetSecurityPolicy setUserIp(java.lang.String userIp) { return (SetSecurityPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetSecurityPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone scoping this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone scoping this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone scoping this request. */ public SetSecurityPolicy setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * Name of the TargetInstance resource to which the security policy should be set. The name * should conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String targetInstance; /** Name of the TargetInstance resource to which the security policy should be set. The name should conform to RFC1035. */ public java.lang.String getTargetInstance() { return targetInstance; } /** * Name of the TargetInstance resource to which the security policy should be set. The name * should conform to RFC1035. */ public SetSecurityPolicy setTargetInstance(java.lang.String targetInstance) { this.targetInstance = targetInstance; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetSecurityPolicy setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetSecurityPolicy set(String parameterName, Object value) { return (SetSecurityPolicy) super.set(parameterName, value); } } } /** * An accessor for creating requests from the TargetPools collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.TargetPools.List request = compute.targetPools().list(parameters ...)}
   * 
* * @return the resource collection */ public TargetPools targetPools() { return new TargetPools(); } /** * The "targetPools" collection of methods. */ public class TargetPools { /** * Adds health check URLs to a target pool. * * Create a request for the method "targetPools.addHealthCheck". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddHealthCheck#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the target pool to add a health check to. * @param content the {@link com.google.api.services.compute.model.TargetPoolsAddHealthCheckRequest} * @return the request */ public AddHealthCheck addHealthCheck(java.lang.String project, java.lang.String region, java.lang.String targetPool, com.google.api.services.compute.model.TargetPoolsAddHealthCheckRequest content) throws java.io.IOException { AddHealthCheck result = new AddHealthCheck(project, region, targetPool, content); initialize(result); return result; } public class AddHealthCheck extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_POOL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Adds health check URLs to a target pool. * * Create a request for the method "targetPools.addHealthCheck". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddHealthCheck#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the target pool to add a health check to. * @param content the {@link com.google.api.services.compute.model.TargetPoolsAddHealthCheckRequest} * @since 1.13 */ protected AddHealthCheck(java.lang.String project, java.lang.String region, java.lang.String targetPool, com.google.api.services.compute.model.TargetPoolsAddHealthCheckRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetPool = com.google.api.client.util.Preconditions.checkNotNull(targetPool, "Required parameter targetPool must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public AddHealthCheck set$Xgafv(java.lang.String $Xgafv) { return (AddHealthCheck) super.set$Xgafv($Xgafv); } @Override public AddHealthCheck setAccessToken(java.lang.String accessToken) { return (AddHealthCheck) super.setAccessToken(accessToken); } @Override public AddHealthCheck setAlt(java.lang.String alt) { return (AddHealthCheck) super.setAlt(alt); } @Override public AddHealthCheck setCallback(java.lang.String callback) { return (AddHealthCheck) super.setCallback(callback); } @Override public AddHealthCheck setFields(java.lang.String fields) { return (AddHealthCheck) super.setFields(fields); } @Override public AddHealthCheck setKey(java.lang.String key) { return (AddHealthCheck) super.setKey(key); } @Override public AddHealthCheck setOauthToken(java.lang.String oauthToken) { return (AddHealthCheck) super.setOauthToken(oauthToken); } @Override public AddHealthCheck setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddHealthCheck) super.setPrettyPrint(prettyPrint); } @Override public AddHealthCheck setQuotaUser(java.lang.String quotaUser) { return (AddHealthCheck) super.setQuotaUser(quotaUser); } @Override public AddHealthCheck setUploadType(java.lang.String uploadType) { return (AddHealthCheck) super.setUploadType(uploadType); } @Override public AddHealthCheck setUploadProtocol(java.lang.String uploadProtocol) { return (AddHealthCheck) super.setUploadProtocol(uploadProtocol); } @Override public AddHealthCheck setUserIp(java.lang.String userIp) { return (AddHealthCheck) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddHealthCheck setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public AddHealthCheck setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the target pool to add a health check to. */ @com.google.api.client.util.Key private java.lang.String targetPool; /** Name of the target pool to add a health check to. */ public java.lang.String getTargetPool() { return targetPool; } /** Name of the target pool to add a health check to. */ public AddHealthCheck setTargetPool(java.lang.String targetPool) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetPool = targetPool; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddHealthCheck setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddHealthCheck set(String parameterName, Object value) { return (AddHealthCheck) super.set(parameterName, value); } } /** * Adds an instance to a target pool. * * Create a request for the method "targetPools.addInstance". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AddInstance#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the TargetPool resource to add instances to. * @param content the {@link com.google.api.services.compute.model.TargetPoolsAddInstanceRequest} * @return the request */ public AddInstance addInstance(java.lang.String project, java.lang.String region, java.lang.String targetPool, com.google.api.services.compute.model.TargetPoolsAddInstanceRequest content) throws java.io.IOException { AddInstance result = new AddInstance(project, region, targetPool, content); initialize(result); return result; } public class AddInstance extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetPools/{targetPool}/addInstance"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_POOL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Adds an instance to a target pool. * * Create a request for the method "targetPools.addInstance". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AddInstance#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the TargetPool resource to add instances to. * @param content the {@link com.google.api.services.compute.model.TargetPoolsAddInstanceRequest} * @since 1.13 */ protected AddInstance(java.lang.String project, java.lang.String region, java.lang.String targetPool, com.google.api.services.compute.model.TargetPoolsAddInstanceRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetPool = com.google.api.client.util.Preconditions.checkNotNull(targetPool, "Required parameter targetPool must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public AddInstance set$Xgafv(java.lang.String $Xgafv) { return (AddInstance) super.set$Xgafv($Xgafv); } @Override public AddInstance setAccessToken(java.lang.String accessToken) { return (AddInstance) super.setAccessToken(accessToken); } @Override public AddInstance setAlt(java.lang.String alt) { return (AddInstance) super.setAlt(alt); } @Override public AddInstance setCallback(java.lang.String callback) { return (AddInstance) super.setCallback(callback); } @Override public AddInstance setFields(java.lang.String fields) { return (AddInstance) super.setFields(fields); } @Override public AddInstance setKey(java.lang.String key) { return (AddInstance) super.setKey(key); } @Override public AddInstance setOauthToken(java.lang.String oauthToken) { return (AddInstance) super.setOauthToken(oauthToken); } @Override public AddInstance setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddInstance) super.setPrettyPrint(prettyPrint); } @Override public AddInstance setQuotaUser(java.lang.String quotaUser) { return (AddInstance) super.setQuotaUser(quotaUser); } @Override public AddInstance setUploadType(java.lang.String uploadType) { return (AddInstance) super.setUploadType(uploadType); } @Override public AddInstance setUploadProtocol(java.lang.String uploadProtocol) { return (AddInstance) super.setUploadProtocol(uploadProtocol); } @Override public AddInstance setUserIp(java.lang.String userIp) { return (AddInstance) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AddInstance setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public AddInstance setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetPool resource to add instances to. */ @com.google.api.client.util.Key private java.lang.String targetPool; /** Name of the TargetPool resource to add instances to. */ public java.lang.String getTargetPool() { return targetPool; } /** Name of the TargetPool resource to add instances to. */ public AddInstance setTargetPool(java.lang.String targetPool) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetPool = targetPool; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public AddInstance setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public AddInstance set(String parameterName, Object value) { return (AddInstance) super.set(parameterName, value); } } /** * Retrieves an aggregated list of target pools. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "targetPools.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/targetPools"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of target pools. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "targetPools.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetPoolAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified target pool. * * Create a request for the method "targetPools.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the TargetPool resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String targetPool) throws java.io.IOException { Delete result = new Delete(project, region, targetPool); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetPools/{targetPool}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_POOL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified target pool. * * Create a request for the method "targetPools.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the TargetPool resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String targetPool) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetPool = com.google.api.client.util.Preconditions.checkNotNull(targetPool, "Required parameter targetPool must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetPool resource to delete. */ @com.google.api.client.util.Key private java.lang.String targetPool; /** Name of the TargetPool resource to delete. */ public java.lang.String getTargetPool() { return targetPool; } /** Name of the TargetPool resource to delete. */ public Delete setTargetPool(java.lang.String targetPool) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetPool = targetPool; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified target pool. * * Create a request for the method "targetPools.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the TargetPool resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String targetPool) throws java.io.IOException { Get result = new Get(project, region, targetPool); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetPools/{targetPool}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_POOL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified target pool. * * Create a request for the method "targetPools.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the TargetPool resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String targetPool) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetPool.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetPool = com.google.api.client.util.Preconditions.checkNotNull(targetPool, "Required parameter targetPool must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetPool resource to return. */ @com.google.api.client.util.Key private java.lang.String targetPool; /** Name of the TargetPool resource to return. */ public java.lang.String getTargetPool() { return targetPool; } /** Name of the TargetPool resource to return. */ public Get setTargetPool(java.lang.String targetPool) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetPool = targetPool; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the most recent health check results for each IP for the instance that is referenced by the * given target pool. * * Create a request for the method "targetPools.getHealth". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetHealth#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the TargetPool resource to which the queried instance belongs. * @param content the {@link com.google.api.services.compute.model.InstanceReference} * @return the request */ public GetHealth getHealth(java.lang.String project, java.lang.String region, java.lang.String targetPool, com.google.api.services.compute.model.InstanceReference content) throws java.io.IOException { GetHealth result = new GetHealth(project, region, targetPool, content); initialize(result); return result; } public class GetHealth extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetPools/{targetPool}/getHealth"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_POOL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Gets the most recent health check results for each IP for the instance that is referenced by * the given target pool. * * Create a request for the method "targetPools.getHealth". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetHealth#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the TargetPool resource to which the queried instance belongs. * @param content the {@link com.google.api.services.compute.model.InstanceReference} * @since 1.13 */ protected GetHealth(java.lang.String project, java.lang.String region, java.lang.String targetPool, com.google.api.services.compute.model.InstanceReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TargetPoolInstanceHealth.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetPool = com.google.api.client.util.Preconditions.checkNotNull(targetPool, "Required parameter targetPool must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public GetHealth set$Xgafv(java.lang.String $Xgafv) { return (GetHealth) super.set$Xgafv($Xgafv); } @Override public GetHealth setAccessToken(java.lang.String accessToken) { return (GetHealth) super.setAccessToken(accessToken); } @Override public GetHealth setAlt(java.lang.String alt) { return (GetHealth) super.setAlt(alt); } @Override public GetHealth setCallback(java.lang.String callback) { return (GetHealth) super.setCallback(callback); } @Override public GetHealth setFields(java.lang.String fields) { return (GetHealth) super.setFields(fields); } @Override public GetHealth setKey(java.lang.String key) { return (GetHealth) super.setKey(key); } @Override public GetHealth setOauthToken(java.lang.String oauthToken) { return (GetHealth) super.setOauthToken(oauthToken); } @Override public GetHealth setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetHealth) super.setPrettyPrint(prettyPrint); } @Override public GetHealth setQuotaUser(java.lang.String quotaUser) { return (GetHealth) super.setQuotaUser(quotaUser); } @Override public GetHealth setUploadType(java.lang.String uploadType) { return (GetHealth) super.setUploadType(uploadType); } @Override public GetHealth setUploadProtocol(java.lang.String uploadProtocol) { return (GetHealth) super.setUploadProtocol(uploadProtocol); } @Override public GetHealth setUserIp(java.lang.String userIp) { return (GetHealth) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetHealth setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public GetHealth setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetPool resource to which the queried instance belongs. */ @com.google.api.client.util.Key private java.lang.String targetPool; /** Name of the TargetPool resource to which the queried instance belongs. */ public java.lang.String getTargetPool() { return targetPool; } /** Name of the TargetPool resource to which the queried instance belongs. */ public GetHealth setTargetPool(java.lang.String targetPool) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetPool = targetPool; return this; } @Override public GetHealth set(String parameterName, Object value) { return (GetHealth) super.set(parameterName, value); } } /** * Creates a target pool in the specified project and region using the data included in the request. * * Create a request for the method "targetPools.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.TargetPool} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.TargetPool content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetPools"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a target pool in the specified project and region using the data included in the * request. * * Create a request for the method "targetPools.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param content the {@link com.google.api.services.compute.model.TargetPool} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.TargetPool content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of target pools available to the specified project and region. * * Create a request for the method "targetPools.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetPools"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of target pools available to the specified project and region. * * Create a request for the method "targetPools.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region scoping this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetPoolList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Removes health check URL from a target pool. * * Create a request for the method "targetPools.removeHealthCheck". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RemoveHealthCheck#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param targetPool Name of the target pool to remove health checks from. * @param content the {@link com.google.api.services.compute.model.TargetPoolsRemoveHealthCheckRequest} * @return the request */ public RemoveHealthCheck removeHealthCheck(java.lang.String project, java.lang.String region, java.lang.String targetPool, com.google.api.services.compute.model.TargetPoolsRemoveHealthCheckRequest content) throws java.io.IOException { RemoveHealthCheck result = new RemoveHealthCheck(project, region, targetPool, content); initialize(result); return result; } public class RemoveHealthCheck extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_POOL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Removes health check URL from a target pool. * * Create a request for the method "targetPools.removeHealthCheck". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RemoveHealthCheck#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param targetPool Name of the target pool to remove health checks from. * @param content the {@link com.google.api.services.compute.model.TargetPoolsRemoveHealthCheckRequest} * @since 1.13 */ protected RemoveHealthCheck(java.lang.String project, java.lang.String region, java.lang.String targetPool, com.google.api.services.compute.model.TargetPoolsRemoveHealthCheckRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetPool = com.google.api.client.util.Preconditions.checkNotNull(targetPool, "Required parameter targetPool must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public RemoveHealthCheck set$Xgafv(java.lang.String $Xgafv) { return (RemoveHealthCheck) super.set$Xgafv($Xgafv); } @Override public RemoveHealthCheck setAccessToken(java.lang.String accessToken) { return (RemoveHealthCheck) super.setAccessToken(accessToken); } @Override public RemoveHealthCheck setAlt(java.lang.String alt) { return (RemoveHealthCheck) super.setAlt(alt); } @Override public RemoveHealthCheck setCallback(java.lang.String callback) { return (RemoveHealthCheck) super.setCallback(callback); } @Override public RemoveHealthCheck setFields(java.lang.String fields) { return (RemoveHealthCheck) super.setFields(fields); } @Override public RemoveHealthCheck setKey(java.lang.String key) { return (RemoveHealthCheck) super.setKey(key); } @Override public RemoveHealthCheck setOauthToken(java.lang.String oauthToken) { return (RemoveHealthCheck) super.setOauthToken(oauthToken); } @Override public RemoveHealthCheck setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveHealthCheck) super.setPrettyPrint(prettyPrint); } @Override public RemoveHealthCheck setQuotaUser(java.lang.String quotaUser) { return (RemoveHealthCheck) super.setQuotaUser(quotaUser); } @Override public RemoveHealthCheck setUploadType(java.lang.String uploadType) { return (RemoveHealthCheck) super.setUploadType(uploadType); } @Override public RemoveHealthCheck setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveHealthCheck) super.setUploadProtocol(uploadProtocol); } @Override public RemoveHealthCheck setUserIp(java.lang.String userIp) { return (RemoveHealthCheck) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public RemoveHealthCheck setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public RemoveHealthCheck setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the target pool to remove health checks from. */ @com.google.api.client.util.Key private java.lang.String targetPool; /** Name of the target pool to remove health checks from. */ public java.lang.String getTargetPool() { return targetPool; } /** Name of the target pool to remove health checks from. */ public RemoveHealthCheck setTargetPool(java.lang.String targetPool) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetPool = targetPool; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public RemoveHealthCheck setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public RemoveHealthCheck set(String parameterName, Object value) { return (RemoveHealthCheck) super.set(parameterName, value); } } /** * Removes instance URL from a target pool. * * Create a request for the method "targetPools.removeInstance". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link RemoveInstance#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the TargetPool resource to remove instances from. * @param content the {@link com.google.api.services.compute.model.TargetPoolsRemoveInstanceRequest} * @return the request */ public RemoveInstance removeInstance(java.lang.String project, java.lang.String region, java.lang.String targetPool, com.google.api.services.compute.model.TargetPoolsRemoveInstanceRequest content) throws java.io.IOException { RemoveInstance result = new RemoveInstance(project, region, targetPool, content); initialize(result); return result; } public class RemoveInstance extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetPools/{targetPool}/removeInstance"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_POOL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Removes instance URL from a target pool. * * Create a request for the method "targetPools.removeInstance". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link RemoveInstance#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the TargetPool resource to remove instances from. * @param content the {@link com.google.api.services.compute.model.TargetPoolsRemoveInstanceRequest} * @since 1.13 */ protected RemoveInstance(java.lang.String project, java.lang.String region, java.lang.String targetPool, com.google.api.services.compute.model.TargetPoolsRemoveInstanceRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetPool = com.google.api.client.util.Preconditions.checkNotNull(targetPool, "Required parameter targetPool must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public RemoveInstance set$Xgafv(java.lang.String $Xgafv) { return (RemoveInstance) super.set$Xgafv($Xgafv); } @Override public RemoveInstance setAccessToken(java.lang.String accessToken) { return (RemoveInstance) super.setAccessToken(accessToken); } @Override public RemoveInstance setAlt(java.lang.String alt) { return (RemoveInstance) super.setAlt(alt); } @Override public RemoveInstance setCallback(java.lang.String callback) { return (RemoveInstance) super.setCallback(callback); } @Override public RemoveInstance setFields(java.lang.String fields) { return (RemoveInstance) super.setFields(fields); } @Override public RemoveInstance setKey(java.lang.String key) { return (RemoveInstance) super.setKey(key); } @Override public RemoveInstance setOauthToken(java.lang.String oauthToken) { return (RemoveInstance) super.setOauthToken(oauthToken); } @Override public RemoveInstance setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveInstance) super.setPrettyPrint(prettyPrint); } @Override public RemoveInstance setQuotaUser(java.lang.String quotaUser) { return (RemoveInstance) super.setQuotaUser(quotaUser); } @Override public RemoveInstance setUploadType(java.lang.String uploadType) { return (RemoveInstance) super.setUploadType(uploadType); } @Override public RemoveInstance setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveInstance) super.setUploadProtocol(uploadProtocol); } @Override public RemoveInstance setUserIp(java.lang.String userIp) { return (RemoveInstance) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public RemoveInstance setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public RemoveInstance setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetPool resource to remove instances from. */ @com.google.api.client.util.Key private java.lang.String targetPool; /** Name of the TargetPool resource to remove instances from. */ public java.lang.String getTargetPool() { return targetPool; } /** Name of the TargetPool resource to remove instances from. */ public RemoveInstance setTargetPool(java.lang.String targetPool) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetPool = targetPool; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public RemoveInstance setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public RemoveInstance set(String parameterName, Object value) { return (RemoveInstance) super.set(parameterName, value); } } /** * Changes a backup target pool's configurations. * * Create a request for the method "targetPools.setBackup". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetBackup#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the TargetPool resource to set a backup pool for. * @param content the {@link com.google.api.services.compute.model.TargetReference} * @return the request */ public SetBackup setBackup(java.lang.String project, java.lang.String region, java.lang.String targetPool, com.google.api.services.compute.model.TargetReference content) throws java.io.IOException { SetBackup result = new SetBackup(project, region, targetPool, content); initialize(result); return result; } public class SetBackup extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetPools/{targetPool}/setBackup"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_POOL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Changes a backup target pool's configurations. * * Create a request for the method "targetPools.setBackup". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetBackup#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the TargetPool resource to set a backup pool for. * @param content the {@link com.google.api.services.compute.model.TargetReference} * @since 1.13 */ protected SetBackup(java.lang.String project, java.lang.String region, java.lang.String targetPool, com.google.api.services.compute.model.TargetReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetPool = com.google.api.client.util.Preconditions.checkNotNull(targetPool, "Required parameter targetPool must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetBackup set$Xgafv(java.lang.String $Xgafv) { return (SetBackup) super.set$Xgafv($Xgafv); } @Override public SetBackup setAccessToken(java.lang.String accessToken) { return (SetBackup) super.setAccessToken(accessToken); } @Override public SetBackup setAlt(java.lang.String alt) { return (SetBackup) super.setAlt(alt); } @Override public SetBackup setCallback(java.lang.String callback) { return (SetBackup) super.setCallback(callback); } @Override public SetBackup setFields(java.lang.String fields) { return (SetBackup) super.setFields(fields); } @Override public SetBackup setKey(java.lang.String key) { return (SetBackup) super.setKey(key); } @Override public SetBackup setOauthToken(java.lang.String oauthToken) { return (SetBackup) super.setOauthToken(oauthToken); } @Override public SetBackup setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetBackup) super.setPrettyPrint(prettyPrint); } @Override public SetBackup setQuotaUser(java.lang.String quotaUser) { return (SetBackup) super.setQuotaUser(quotaUser); } @Override public SetBackup setUploadType(java.lang.String uploadType) { return (SetBackup) super.setUploadType(uploadType); } @Override public SetBackup setUploadProtocol(java.lang.String uploadProtocol) { return (SetBackup) super.setUploadProtocol(uploadProtocol); } @Override public SetBackup setUserIp(java.lang.String userIp) { return (SetBackup) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetBackup setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public SetBackup setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the TargetPool resource to set a backup pool for. */ @com.google.api.client.util.Key private java.lang.String targetPool; /** Name of the TargetPool resource to set a backup pool for. */ public java.lang.String getTargetPool() { return targetPool; } /** Name of the TargetPool resource to set a backup pool for. */ public SetBackup setTargetPool(java.lang.String targetPool) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_POOL_PATTERN.matcher(targetPool).matches(), "Parameter targetPool must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetPool = targetPool; return this; } /** New failoverRatio value for the target pool. */ @com.google.api.client.util.Key private java.lang.Float failoverRatio; /** New failoverRatio value for the target pool. */ public java.lang.Float getFailoverRatio() { return failoverRatio; } /** New failoverRatio value for the target pool. */ public SetBackup setFailoverRatio(java.lang.Float failoverRatio) { this.failoverRatio = failoverRatio; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetBackup setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetBackup set(String parameterName, Object value) { return (SetBackup) super.set(parameterName, value); } } /** * Sets the Google Cloud Armor security policy for the specified target pool. For more information, * see Google Cloud Armor Overview * * Create a request for the method "targetPools.setSecurityPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetSecurityPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the TargetPool resource to which the security policy should be set. The name should conform * to RFC1035. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyReference} * @return the request */ public SetSecurityPolicy setSecurityPolicy(java.lang.String project, java.lang.String region, java.lang.String targetPool, com.google.api.services.compute.model.SecurityPolicyReference content) throws java.io.IOException { SetSecurityPolicy result = new SetSecurityPolicy(project, region, targetPool, content); initialize(result); return result; } public class SetSecurityPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Sets the Google Cloud Armor security policy for the specified target pool. For more * information, see Google Cloud Armor Overview * * Create a request for the method "targetPools.setSecurityPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetSecurityPolicy#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param region Name of the region scoping this request. * @param targetPool Name of the TargetPool resource to which the security policy should be set. The name should conform * to RFC1035. * @param content the {@link com.google.api.services.compute.model.SecurityPolicyReference} * @since 1.13 */ protected SetSecurityPolicy(java.lang.String project, java.lang.String region, java.lang.String targetPool, com.google.api.services.compute.model.SecurityPolicyReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetPool = com.google.api.client.util.Preconditions.checkNotNull(targetPool, "Required parameter targetPool must be specified."); } @Override public SetSecurityPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetSecurityPolicy) super.set$Xgafv($Xgafv); } @Override public SetSecurityPolicy setAccessToken(java.lang.String accessToken) { return (SetSecurityPolicy) super.setAccessToken(accessToken); } @Override public SetSecurityPolicy setAlt(java.lang.String alt) { return (SetSecurityPolicy) super.setAlt(alt); } @Override public SetSecurityPolicy setCallback(java.lang.String callback) { return (SetSecurityPolicy) super.setCallback(callback); } @Override public SetSecurityPolicy setFields(java.lang.String fields) { return (SetSecurityPolicy) super.setFields(fields); } @Override public SetSecurityPolicy setKey(java.lang.String key) { return (SetSecurityPolicy) super.setKey(key); } @Override public SetSecurityPolicy setOauthToken(java.lang.String oauthToken) { return (SetSecurityPolicy) super.setOauthToken(oauthToken); } @Override public SetSecurityPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetSecurityPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetSecurityPolicy setQuotaUser(java.lang.String quotaUser) { return (SetSecurityPolicy) super.setQuotaUser(quotaUser); } @Override public SetSecurityPolicy setUploadType(java.lang.String uploadType) { return (SetSecurityPolicy) super.setUploadType(uploadType); } @Override public SetSecurityPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetSecurityPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetSecurityPolicy setUserIp(java.lang.String userIp) { return (SetSecurityPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetSecurityPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region scoping this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region scoping this request. */ public java.lang.String getRegion() { return region; } /** Name of the region scoping this request. */ public SetSecurityPolicy setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * Name of the TargetPool resource to which the security policy should be set. The name should * conform to RFC1035. */ @com.google.api.client.util.Key private java.lang.String targetPool; /** Name of the TargetPool resource to which the security policy should be set. The name should conform to RFC1035. */ public java.lang.String getTargetPool() { return targetPool; } /** * Name of the TargetPool resource to which the security policy should be set. The name should * conform to RFC1035. */ public SetSecurityPolicy setTargetPool(java.lang.String targetPool) { this.targetPool = targetPool; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetSecurityPolicy setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetSecurityPolicy set(String parameterName, Object value) { return (SetSecurityPolicy) super.set(parameterName, value); } } } /** * An accessor for creating requests from the TargetSslProxies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.TargetSslProxies.List request = compute.targetSslProxies().list(parameters ...)}
   * 
* * @return the resource collection */ public TargetSslProxies targetSslProxies() { return new TargetSslProxies(); } /** * The "targetSslProxies" collection of methods. */ public class TargetSslProxies { /** * Deletes the specified TargetSslProxy resource. * * Create a request for the method "targetSslProxies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetSslProxy Name of the TargetSslProxy resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String targetSslProxy) throws java.io.IOException { Delete result = new Delete(project, targetSslProxy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetSslProxies/{targetSslProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_SSL_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified TargetSslProxy resource. * * Create a request for the method "targetSslProxies.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param targetSslProxy Name of the TargetSslProxy resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String targetSslProxy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetSslProxy = com.google.api.client.util.Preconditions.checkNotNull(targetSslProxy, "Required parameter targetSslProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_SSL_PROXY_PATTERN.matcher(targetSslProxy).matches(), "Parameter targetSslProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetSslProxy resource to delete. */ @com.google.api.client.util.Key private java.lang.String targetSslProxy; /** Name of the TargetSslProxy resource to delete. */ public java.lang.String getTargetSslProxy() { return targetSslProxy; } /** Name of the TargetSslProxy resource to delete. */ public Delete setTargetSslProxy(java.lang.String targetSslProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_SSL_PROXY_PATTERN.matcher(targetSslProxy).matches(), "Parameter targetSslProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetSslProxy = targetSslProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified TargetSslProxy resource. * * Create a request for the method "targetSslProxies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetSslProxy Name of the TargetSslProxy resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String targetSslProxy) throws java.io.IOException { Get result = new Get(project, targetSslProxy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetSslProxies/{targetSslProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_SSL_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified TargetSslProxy resource. * * Create a request for the method "targetSslProxies.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param targetSslProxy Name of the TargetSslProxy resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String targetSslProxy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetSslProxy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetSslProxy = com.google.api.client.util.Preconditions.checkNotNull(targetSslProxy, "Required parameter targetSslProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_SSL_PROXY_PATTERN.matcher(targetSslProxy).matches(), "Parameter targetSslProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetSslProxy resource to return. */ @com.google.api.client.util.Key private java.lang.String targetSslProxy; /** Name of the TargetSslProxy resource to return. */ public java.lang.String getTargetSslProxy() { return targetSslProxy; } /** Name of the TargetSslProxy resource to return. */ public Get setTargetSslProxy(java.lang.String targetSslProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_SSL_PROXY_PATTERN.matcher(targetSslProxy).matches(), "Parameter targetSslProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetSslProxy = targetSslProxy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a TargetSslProxy resource in the specified project using the data included in the * request. * * Create a request for the method "targetSslProxies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.TargetSslProxy} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.TargetSslProxy content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetSslProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a TargetSslProxy resource in the specified project using the data included in the * request. * * Create a request for the method "targetSslProxies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.TargetSslProxy} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.TargetSslProxy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of TargetSslProxy resources available to the specified project. * * Create a request for the method "targetSslProxies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetSslProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of TargetSslProxy resources available to the specified project. * * Create a request for the method "targetSslProxies.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetSslProxyList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Changes the BackendService for TargetSslProxy. * * Create a request for the method "targetSslProxies.setBackendService". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetBackendService#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetSslProxy Name of the TargetSslProxy resource whose BackendService resource is to be set. * @param content the {@link com.google.api.services.compute.model.TargetSslProxiesSetBackendServiceRequest} * @return the request */ public SetBackendService setBackendService(java.lang.String project, java.lang.String targetSslProxy, com.google.api.services.compute.model.TargetSslProxiesSetBackendServiceRequest content) throws java.io.IOException { SetBackendService result = new SetBackendService(project, targetSslProxy, content); initialize(result); return result; } public class SetBackendService extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetSslProxies/{targetSslProxy}/setBackendService"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_SSL_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Changes the BackendService for TargetSslProxy. * * Create a request for the method "targetSslProxies.setBackendService". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetBackendService#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param targetSslProxy Name of the TargetSslProxy resource whose BackendService resource is to be set. * @param content the {@link com.google.api.services.compute.model.TargetSslProxiesSetBackendServiceRequest} * @since 1.13 */ protected SetBackendService(java.lang.String project, java.lang.String targetSslProxy, com.google.api.services.compute.model.TargetSslProxiesSetBackendServiceRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetSslProxy = com.google.api.client.util.Preconditions.checkNotNull(targetSslProxy, "Required parameter targetSslProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_SSL_PROXY_PATTERN.matcher(targetSslProxy).matches(), "Parameter targetSslProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetBackendService set$Xgafv(java.lang.String $Xgafv) { return (SetBackendService) super.set$Xgafv($Xgafv); } @Override public SetBackendService setAccessToken(java.lang.String accessToken) { return (SetBackendService) super.setAccessToken(accessToken); } @Override public SetBackendService setAlt(java.lang.String alt) { return (SetBackendService) super.setAlt(alt); } @Override public SetBackendService setCallback(java.lang.String callback) { return (SetBackendService) super.setCallback(callback); } @Override public SetBackendService setFields(java.lang.String fields) { return (SetBackendService) super.setFields(fields); } @Override public SetBackendService setKey(java.lang.String key) { return (SetBackendService) super.setKey(key); } @Override public SetBackendService setOauthToken(java.lang.String oauthToken) { return (SetBackendService) super.setOauthToken(oauthToken); } @Override public SetBackendService setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetBackendService) super.setPrettyPrint(prettyPrint); } @Override public SetBackendService setQuotaUser(java.lang.String quotaUser) { return (SetBackendService) super.setQuotaUser(quotaUser); } @Override public SetBackendService setUploadType(java.lang.String uploadType) { return (SetBackendService) super.setUploadType(uploadType); } @Override public SetBackendService setUploadProtocol(java.lang.String uploadProtocol) { return (SetBackendService) super.setUploadProtocol(uploadProtocol); } @Override public SetBackendService setUserIp(java.lang.String userIp) { return (SetBackendService) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetBackendService setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetSslProxy resource whose BackendService resource is to be set. */ @com.google.api.client.util.Key private java.lang.String targetSslProxy; /** Name of the TargetSslProxy resource whose BackendService resource is to be set. */ public java.lang.String getTargetSslProxy() { return targetSslProxy; } /** Name of the TargetSslProxy resource whose BackendService resource is to be set. */ public SetBackendService setTargetSslProxy(java.lang.String targetSslProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_SSL_PROXY_PATTERN.matcher(targetSslProxy).matches(), "Parameter targetSslProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetSslProxy = targetSslProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetBackendService setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetBackendService set(String parameterName, Object value) { return (SetBackendService) super.set(parameterName, value); } } /** * Changes the Certificate Map for TargetSslProxy. * * Create a request for the method "targetSslProxies.setCertificateMap". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetCertificateMap#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetSslProxy Name of the TargetSslProxy resource whose CertificateMap is to be set. The name must be 1-63 * characters long, and comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.TargetSslProxiesSetCertificateMapRequest} * @return the request */ public SetCertificateMap setCertificateMap(java.lang.String project, java.lang.String targetSslProxy, com.google.api.services.compute.model.TargetSslProxiesSetCertificateMapRequest content) throws java.io.IOException { SetCertificateMap result = new SetCertificateMap(project, targetSslProxy, content); initialize(result); return result; } public class SetCertificateMap extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetSslProxies/{targetSslProxy}/setCertificateMap"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Changes the Certificate Map for TargetSslProxy. * * Create a request for the method "targetSslProxies.setCertificateMap". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetCertificateMap#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param targetSslProxy Name of the TargetSslProxy resource whose CertificateMap is to be set. The name must be 1-63 * characters long, and comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.TargetSslProxiesSetCertificateMapRequest} * @since 1.13 */ protected SetCertificateMap(java.lang.String project, java.lang.String targetSslProxy, com.google.api.services.compute.model.TargetSslProxiesSetCertificateMapRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetSslProxy = com.google.api.client.util.Preconditions.checkNotNull(targetSslProxy, "Required parameter targetSslProxy must be specified."); } @Override public SetCertificateMap set$Xgafv(java.lang.String $Xgafv) { return (SetCertificateMap) super.set$Xgafv($Xgafv); } @Override public SetCertificateMap setAccessToken(java.lang.String accessToken) { return (SetCertificateMap) super.setAccessToken(accessToken); } @Override public SetCertificateMap setAlt(java.lang.String alt) { return (SetCertificateMap) super.setAlt(alt); } @Override public SetCertificateMap setCallback(java.lang.String callback) { return (SetCertificateMap) super.setCallback(callback); } @Override public SetCertificateMap setFields(java.lang.String fields) { return (SetCertificateMap) super.setFields(fields); } @Override public SetCertificateMap setKey(java.lang.String key) { return (SetCertificateMap) super.setKey(key); } @Override public SetCertificateMap setOauthToken(java.lang.String oauthToken) { return (SetCertificateMap) super.setOauthToken(oauthToken); } @Override public SetCertificateMap setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetCertificateMap) super.setPrettyPrint(prettyPrint); } @Override public SetCertificateMap setQuotaUser(java.lang.String quotaUser) { return (SetCertificateMap) super.setQuotaUser(quotaUser); } @Override public SetCertificateMap setUploadType(java.lang.String uploadType) { return (SetCertificateMap) super.setUploadType(uploadType); } @Override public SetCertificateMap setUploadProtocol(java.lang.String uploadProtocol) { return (SetCertificateMap) super.setUploadProtocol(uploadProtocol); } @Override public SetCertificateMap setUserIp(java.lang.String userIp) { return (SetCertificateMap) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetCertificateMap setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the TargetSslProxy resource whose CertificateMap is to be set. The name must be * 1-63 characters long, and comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String targetSslProxy; /** Name of the TargetSslProxy resource whose CertificateMap is to be set. The name must be 1-63 characters long, and comply with RFC1035. */ public java.lang.String getTargetSslProxy() { return targetSslProxy; } /** * Name of the TargetSslProxy resource whose CertificateMap is to be set. The name must be * 1-63 characters long, and comply with RFC1035. */ public SetCertificateMap setTargetSslProxy(java.lang.String targetSslProxy) { this.targetSslProxy = targetSslProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetCertificateMap setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetCertificateMap set(String parameterName, Object value) { return (SetCertificateMap) super.set(parameterName, value); } } /** * Changes the ProxyHeaderType for TargetSslProxy. * * Create a request for the method "targetSslProxies.setProxyHeader". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetProxyHeader#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetSslProxy Name of the TargetSslProxy resource whose ProxyHeader is to be set. * @param content the {@link com.google.api.services.compute.model.TargetSslProxiesSetProxyHeaderRequest} * @return the request */ public SetProxyHeader setProxyHeader(java.lang.String project, java.lang.String targetSslProxy, com.google.api.services.compute.model.TargetSslProxiesSetProxyHeaderRequest content) throws java.io.IOException { SetProxyHeader result = new SetProxyHeader(project, targetSslProxy, content); initialize(result); return result; } public class SetProxyHeader extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_SSL_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Changes the ProxyHeaderType for TargetSslProxy. * * Create a request for the method "targetSslProxies.setProxyHeader". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetProxyHeader#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param targetSslProxy Name of the TargetSslProxy resource whose ProxyHeader is to be set. * @param content the {@link com.google.api.services.compute.model.TargetSslProxiesSetProxyHeaderRequest} * @since 1.13 */ protected SetProxyHeader(java.lang.String project, java.lang.String targetSslProxy, com.google.api.services.compute.model.TargetSslProxiesSetProxyHeaderRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetSslProxy = com.google.api.client.util.Preconditions.checkNotNull(targetSslProxy, "Required parameter targetSslProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_SSL_PROXY_PATTERN.matcher(targetSslProxy).matches(), "Parameter targetSslProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetProxyHeader set$Xgafv(java.lang.String $Xgafv) { return (SetProxyHeader) super.set$Xgafv($Xgafv); } @Override public SetProxyHeader setAccessToken(java.lang.String accessToken) { return (SetProxyHeader) super.setAccessToken(accessToken); } @Override public SetProxyHeader setAlt(java.lang.String alt) { return (SetProxyHeader) super.setAlt(alt); } @Override public SetProxyHeader setCallback(java.lang.String callback) { return (SetProxyHeader) super.setCallback(callback); } @Override public SetProxyHeader setFields(java.lang.String fields) { return (SetProxyHeader) super.setFields(fields); } @Override public SetProxyHeader setKey(java.lang.String key) { return (SetProxyHeader) super.setKey(key); } @Override public SetProxyHeader setOauthToken(java.lang.String oauthToken) { return (SetProxyHeader) super.setOauthToken(oauthToken); } @Override public SetProxyHeader setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetProxyHeader) super.setPrettyPrint(prettyPrint); } @Override public SetProxyHeader setQuotaUser(java.lang.String quotaUser) { return (SetProxyHeader) super.setQuotaUser(quotaUser); } @Override public SetProxyHeader setUploadType(java.lang.String uploadType) { return (SetProxyHeader) super.setUploadType(uploadType); } @Override public SetProxyHeader setUploadProtocol(java.lang.String uploadProtocol) { return (SetProxyHeader) super.setUploadProtocol(uploadProtocol); } @Override public SetProxyHeader setUserIp(java.lang.String userIp) { return (SetProxyHeader) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetProxyHeader setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetSslProxy resource whose ProxyHeader is to be set. */ @com.google.api.client.util.Key private java.lang.String targetSslProxy; /** Name of the TargetSslProxy resource whose ProxyHeader is to be set. */ public java.lang.String getTargetSslProxy() { return targetSslProxy; } /** Name of the TargetSslProxy resource whose ProxyHeader is to be set. */ public SetProxyHeader setTargetSslProxy(java.lang.String targetSslProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_SSL_PROXY_PATTERN.matcher(targetSslProxy).matches(), "Parameter targetSslProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetSslProxy = targetSslProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetProxyHeader setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetProxyHeader set(String parameterName, Object value) { return (SetProxyHeader) super.set(parameterName, value); } } /** * Changes SslCertificates for TargetSslProxy. * * Create a request for the method "targetSslProxies.setSslCertificates". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetSslCertificates#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetSslProxy Name of the TargetSslProxy resource whose SslCertificate resource is to be set. * @param content the {@link com.google.api.services.compute.model.TargetSslProxiesSetSslCertificatesRequest} * @return the request */ public SetSslCertificates setSslCertificates(java.lang.String project, java.lang.String targetSslProxy, com.google.api.services.compute.model.TargetSslProxiesSetSslCertificatesRequest content) throws java.io.IOException { SetSslCertificates result = new SetSslCertificates(project, targetSslProxy, content); initialize(result); return result; } public class SetSslCertificates extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_SSL_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Changes SslCertificates for TargetSslProxy. * * Create a request for the method "targetSslProxies.setSslCertificates". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetSslCertificates#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param targetSslProxy Name of the TargetSslProxy resource whose SslCertificate resource is to be set. * @param content the {@link com.google.api.services.compute.model.TargetSslProxiesSetSslCertificatesRequest} * @since 1.13 */ protected SetSslCertificates(java.lang.String project, java.lang.String targetSslProxy, com.google.api.services.compute.model.TargetSslProxiesSetSslCertificatesRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetSslProxy = com.google.api.client.util.Preconditions.checkNotNull(targetSslProxy, "Required parameter targetSslProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_SSL_PROXY_PATTERN.matcher(targetSslProxy).matches(), "Parameter targetSslProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetSslCertificates set$Xgafv(java.lang.String $Xgafv) { return (SetSslCertificates) super.set$Xgafv($Xgafv); } @Override public SetSslCertificates setAccessToken(java.lang.String accessToken) { return (SetSslCertificates) super.setAccessToken(accessToken); } @Override public SetSslCertificates setAlt(java.lang.String alt) { return (SetSslCertificates) super.setAlt(alt); } @Override public SetSslCertificates setCallback(java.lang.String callback) { return (SetSslCertificates) super.setCallback(callback); } @Override public SetSslCertificates setFields(java.lang.String fields) { return (SetSslCertificates) super.setFields(fields); } @Override public SetSslCertificates setKey(java.lang.String key) { return (SetSslCertificates) super.setKey(key); } @Override public SetSslCertificates setOauthToken(java.lang.String oauthToken) { return (SetSslCertificates) super.setOauthToken(oauthToken); } @Override public SetSslCertificates setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetSslCertificates) super.setPrettyPrint(prettyPrint); } @Override public SetSslCertificates setQuotaUser(java.lang.String quotaUser) { return (SetSslCertificates) super.setQuotaUser(quotaUser); } @Override public SetSslCertificates setUploadType(java.lang.String uploadType) { return (SetSslCertificates) super.setUploadType(uploadType); } @Override public SetSslCertificates setUploadProtocol(java.lang.String uploadProtocol) { return (SetSslCertificates) super.setUploadProtocol(uploadProtocol); } @Override public SetSslCertificates setUserIp(java.lang.String userIp) { return (SetSslCertificates) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetSslCertificates setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetSslProxy resource whose SslCertificate resource is to be set. */ @com.google.api.client.util.Key private java.lang.String targetSslProxy; /** Name of the TargetSslProxy resource whose SslCertificate resource is to be set. */ public java.lang.String getTargetSslProxy() { return targetSslProxy; } /** Name of the TargetSslProxy resource whose SslCertificate resource is to be set. */ public SetSslCertificates setTargetSslProxy(java.lang.String targetSslProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_SSL_PROXY_PATTERN.matcher(targetSslProxy).matches(), "Parameter targetSslProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetSslProxy = targetSslProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetSslCertificates setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetSslCertificates set(String parameterName, Object value) { return (SetSslCertificates) super.set(parameterName, value); } } /** * Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL * features. This affects connections between clients and the load balancer. They do not affect the * connection between the load balancer and the backends. * * Create a request for the method "targetSslProxies.setSslPolicy". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetSslPolicy#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetSslProxy Name of the TargetSslProxy resource whose SSL policy is to be set. The name must be 1-63 characters * long, and comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.SslPolicyReference} * @return the request */ public SetSslPolicy setSslPolicy(java.lang.String project, java.lang.String targetSslProxy, com.google.api.services.compute.model.SslPolicyReference content) throws java.io.IOException { SetSslPolicy result = new SetSslPolicy(project, targetSslProxy, content); initialize(result); return result; } public class SetSslPolicy extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslPolicy"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for * SSL features. This affects connections between clients and the load balancer. They do not * affect the connection between the load balancer and the backends. * * Create a request for the method "targetSslProxies.setSslPolicy". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetSslPolicy#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param targetSslProxy Name of the TargetSslProxy resource whose SSL policy is to be set. The name must be 1-63 characters * long, and comply with RFC1035. * @param content the {@link com.google.api.services.compute.model.SslPolicyReference} * @since 1.13 */ protected SetSslPolicy(java.lang.String project, java.lang.String targetSslProxy, com.google.api.services.compute.model.SslPolicyReference content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetSslProxy = com.google.api.client.util.Preconditions.checkNotNull(targetSslProxy, "Required parameter targetSslProxy must be specified."); } @Override public SetSslPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetSslPolicy) super.set$Xgafv($Xgafv); } @Override public SetSslPolicy setAccessToken(java.lang.String accessToken) { return (SetSslPolicy) super.setAccessToken(accessToken); } @Override public SetSslPolicy setAlt(java.lang.String alt) { return (SetSslPolicy) super.setAlt(alt); } @Override public SetSslPolicy setCallback(java.lang.String callback) { return (SetSslPolicy) super.setCallback(callback); } @Override public SetSslPolicy setFields(java.lang.String fields) { return (SetSslPolicy) super.setFields(fields); } @Override public SetSslPolicy setKey(java.lang.String key) { return (SetSslPolicy) super.setKey(key); } @Override public SetSslPolicy setOauthToken(java.lang.String oauthToken) { return (SetSslPolicy) super.setOauthToken(oauthToken); } @Override public SetSslPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetSslPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetSslPolicy setQuotaUser(java.lang.String quotaUser) { return (SetSslPolicy) super.setQuotaUser(quotaUser); } @Override public SetSslPolicy setUploadType(java.lang.String uploadType) { return (SetSslPolicy) super.setUploadType(uploadType); } @Override public SetSslPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetSslPolicy) super.setUploadProtocol(uploadProtocol); } @Override public SetSslPolicy setUserIp(java.lang.String userIp) { return (SetSslPolicy) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetSslPolicy setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * Name of the TargetSslProxy resource whose SSL policy is to be set. The name must be 1-63 * characters long, and comply with RFC1035. */ @com.google.api.client.util.Key private java.lang.String targetSslProxy; /** Name of the TargetSslProxy resource whose SSL policy is to be set. The name must be 1-63 characters long, and comply with RFC1035. */ public java.lang.String getTargetSslProxy() { return targetSslProxy; } /** * Name of the TargetSslProxy resource whose SSL policy is to be set. The name must be 1-63 * characters long, and comply with RFC1035. */ public SetSslPolicy setTargetSslProxy(java.lang.String targetSslProxy) { this.targetSslProxy = targetSslProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetSslPolicy setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetSslPolicy set(String parameterName, Object value) { return (SetSslPolicy) super.set(parameterName, value); } } } /** * An accessor for creating requests from the TargetTcpProxies collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.TargetTcpProxies.List request = compute.targetTcpProxies().list(parameters ...)}
   * 
* * @return the resource collection */ public TargetTcpProxies targetTcpProxies() { return new TargetTcpProxies(); } /** * The "targetTcpProxies" collection of methods. */ public class TargetTcpProxies { /** * Retrieves the list of all TargetTcpProxy resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the `returnPartialSuccess` * parameter to `true`. * * Create a request for the method "targetTcpProxies.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Name of the project scoping this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/targetTcpProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of all TargetTcpProxy resources, regional and global, available to the * specified project. To prevent failure, Google recommends that you set the * `returnPartialSuccess` parameter to `true`. * * Create a request for the method "targetTcpProxies.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Name of the project scoping this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetTcpProxyAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Name of the project scoping this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Name of the project scoping this request. */ public java.lang.String getProject() { return project; } /** Name of the project scoping this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified TargetTcpProxy resource. * * Create a request for the method "targetTcpProxies.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetTcpProxy Name of the TargetTcpProxy resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String targetTcpProxy) throws java.io.IOException { Delete result = new Delete(project, targetTcpProxy); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetTcpProxies/{targetTcpProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_TCP_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified TargetTcpProxy resource. * * Create a request for the method "targetTcpProxies.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param targetTcpProxy Name of the TargetTcpProxy resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String targetTcpProxy) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetTcpProxy = com.google.api.client.util.Preconditions.checkNotNull(targetTcpProxy, "Required parameter targetTcpProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_TCP_PROXY_PATTERN.matcher(targetTcpProxy).matches(), "Parameter targetTcpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetTcpProxy resource to delete. */ @com.google.api.client.util.Key private java.lang.String targetTcpProxy; /** Name of the TargetTcpProxy resource to delete. */ public java.lang.String getTargetTcpProxy() { return targetTcpProxy; } /** Name of the TargetTcpProxy resource to delete. */ public Delete setTargetTcpProxy(java.lang.String targetTcpProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_TCP_PROXY_PATTERN.matcher(targetTcpProxy).matches(), "Parameter targetTcpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetTcpProxy = targetTcpProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified TargetTcpProxy resource. * * Create a request for the method "targetTcpProxies.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetTcpProxy Name of the TargetTcpProxy resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String targetTcpProxy) throws java.io.IOException { Get result = new Get(project, targetTcpProxy); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetTcpProxies/{targetTcpProxy}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_TCP_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified TargetTcpProxy resource. * * Create a request for the method "targetTcpProxies.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param targetTcpProxy Name of the TargetTcpProxy resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String targetTcpProxy) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetTcpProxy.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetTcpProxy = com.google.api.client.util.Preconditions.checkNotNull(targetTcpProxy, "Required parameter targetTcpProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_TCP_PROXY_PATTERN.matcher(targetTcpProxy).matches(), "Parameter targetTcpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetTcpProxy resource to return. */ @com.google.api.client.util.Key private java.lang.String targetTcpProxy; /** Name of the TargetTcpProxy resource to return. */ public java.lang.String getTargetTcpProxy() { return targetTcpProxy; } /** Name of the TargetTcpProxy resource to return. */ public Get setTargetTcpProxy(java.lang.String targetTcpProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_TCP_PROXY_PATTERN.matcher(targetTcpProxy).matches(), "Parameter targetTcpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetTcpProxy = targetTcpProxy; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a TargetTcpProxy resource in the specified project using the data included in the * request. * * Create a request for the method "targetTcpProxies.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.TargetTcpProxy} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.TargetTcpProxy content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetTcpProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a TargetTcpProxy resource in the specified project using the data included in the * request. * * Create a request for the method "targetTcpProxies.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.TargetTcpProxy} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.TargetTcpProxy content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves the list of TargetTcpProxy resources available to the specified project. * * Create a request for the method "targetTcpProxies.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetTcpProxies"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of TargetTcpProxy resources available to the specified project. * * Create a request for the method "targetTcpProxies.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetTcpProxyList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Changes the BackendService for TargetTcpProxy. * * Create a request for the method "targetTcpProxies.setBackendService". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetBackendService#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetTcpProxy Name of the TargetTcpProxy resource whose BackendService resource is to be set. * @param content the {@link com.google.api.services.compute.model.TargetTcpProxiesSetBackendServiceRequest} * @return the request */ public SetBackendService setBackendService(java.lang.String project, java.lang.String targetTcpProxy, com.google.api.services.compute.model.TargetTcpProxiesSetBackendServiceRequest content) throws java.io.IOException { SetBackendService result = new SetBackendService(project, targetTcpProxy, content); initialize(result); return result; } public class SetBackendService extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_TCP_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Changes the BackendService for TargetTcpProxy. * * Create a request for the method "targetTcpProxies.setBackendService". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetBackendService#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param targetTcpProxy Name of the TargetTcpProxy resource whose BackendService resource is to be set. * @param content the {@link com.google.api.services.compute.model.TargetTcpProxiesSetBackendServiceRequest} * @since 1.13 */ protected SetBackendService(java.lang.String project, java.lang.String targetTcpProxy, com.google.api.services.compute.model.TargetTcpProxiesSetBackendServiceRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetTcpProxy = com.google.api.client.util.Preconditions.checkNotNull(targetTcpProxy, "Required parameter targetTcpProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_TCP_PROXY_PATTERN.matcher(targetTcpProxy).matches(), "Parameter targetTcpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetBackendService set$Xgafv(java.lang.String $Xgafv) { return (SetBackendService) super.set$Xgafv($Xgafv); } @Override public SetBackendService setAccessToken(java.lang.String accessToken) { return (SetBackendService) super.setAccessToken(accessToken); } @Override public SetBackendService setAlt(java.lang.String alt) { return (SetBackendService) super.setAlt(alt); } @Override public SetBackendService setCallback(java.lang.String callback) { return (SetBackendService) super.setCallback(callback); } @Override public SetBackendService setFields(java.lang.String fields) { return (SetBackendService) super.setFields(fields); } @Override public SetBackendService setKey(java.lang.String key) { return (SetBackendService) super.setKey(key); } @Override public SetBackendService setOauthToken(java.lang.String oauthToken) { return (SetBackendService) super.setOauthToken(oauthToken); } @Override public SetBackendService setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetBackendService) super.setPrettyPrint(prettyPrint); } @Override public SetBackendService setQuotaUser(java.lang.String quotaUser) { return (SetBackendService) super.setQuotaUser(quotaUser); } @Override public SetBackendService setUploadType(java.lang.String uploadType) { return (SetBackendService) super.setUploadType(uploadType); } @Override public SetBackendService setUploadProtocol(java.lang.String uploadProtocol) { return (SetBackendService) super.setUploadProtocol(uploadProtocol); } @Override public SetBackendService setUserIp(java.lang.String userIp) { return (SetBackendService) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetBackendService setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetTcpProxy resource whose BackendService resource is to be set. */ @com.google.api.client.util.Key private java.lang.String targetTcpProxy; /** Name of the TargetTcpProxy resource whose BackendService resource is to be set. */ public java.lang.String getTargetTcpProxy() { return targetTcpProxy; } /** Name of the TargetTcpProxy resource whose BackendService resource is to be set. */ public SetBackendService setTargetTcpProxy(java.lang.String targetTcpProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_TCP_PROXY_PATTERN.matcher(targetTcpProxy).matches(), "Parameter targetTcpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetTcpProxy = targetTcpProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetBackendService setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetBackendService set(String parameterName, Object value) { return (SetBackendService) super.set(parameterName, value); } } /** * Changes the ProxyHeaderType for TargetTcpProxy. * * Create a request for the method "targetTcpProxies.setProxyHeader". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetProxyHeader#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param targetTcpProxy Name of the TargetTcpProxy resource whose ProxyHeader is to be set. * @param content the {@link com.google.api.services.compute.model.TargetTcpProxiesSetProxyHeaderRequest} * @return the request */ public SetProxyHeader setProxyHeader(java.lang.String project, java.lang.String targetTcpProxy, com.google.api.services.compute.model.TargetTcpProxiesSetProxyHeaderRequest content) throws java.io.IOException { SetProxyHeader result = new SetProxyHeader(project, targetTcpProxy, content); initialize(result); return result; } public class SetProxyHeader extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern TARGET_TCP_PROXY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Changes the ProxyHeaderType for TargetTcpProxy. * * Create a request for the method "targetTcpProxies.setProxyHeader". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetProxyHeader#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param targetTcpProxy Name of the TargetTcpProxy resource whose ProxyHeader is to be set. * @param content the {@link com.google.api.services.compute.model.TargetTcpProxiesSetProxyHeaderRequest} * @since 1.13 */ protected SetProxyHeader(java.lang.String project, java.lang.String targetTcpProxy, com.google.api.services.compute.model.TargetTcpProxiesSetProxyHeaderRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.targetTcpProxy = com.google.api.client.util.Preconditions.checkNotNull(targetTcpProxy, "Required parameter targetTcpProxy must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_TCP_PROXY_PATTERN.matcher(targetTcpProxy).matches(), "Parameter targetTcpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetProxyHeader set$Xgafv(java.lang.String $Xgafv) { return (SetProxyHeader) super.set$Xgafv($Xgafv); } @Override public SetProxyHeader setAccessToken(java.lang.String accessToken) { return (SetProxyHeader) super.setAccessToken(accessToken); } @Override public SetProxyHeader setAlt(java.lang.String alt) { return (SetProxyHeader) super.setAlt(alt); } @Override public SetProxyHeader setCallback(java.lang.String callback) { return (SetProxyHeader) super.setCallback(callback); } @Override public SetProxyHeader setFields(java.lang.String fields) { return (SetProxyHeader) super.setFields(fields); } @Override public SetProxyHeader setKey(java.lang.String key) { return (SetProxyHeader) super.setKey(key); } @Override public SetProxyHeader setOauthToken(java.lang.String oauthToken) { return (SetProxyHeader) super.setOauthToken(oauthToken); } @Override public SetProxyHeader setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetProxyHeader) super.setPrettyPrint(prettyPrint); } @Override public SetProxyHeader setQuotaUser(java.lang.String quotaUser) { return (SetProxyHeader) super.setQuotaUser(quotaUser); } @Override public SetProxyHeader setUploadType(java.lang.String uploadType) { return (SetProxyHeader) super.setUploadType(uploadType); } @Override public SetProxyHeader setUploadProtocol(java.lang.String uploadProtocol) { return (SetProxyHeader) super.setUploadProtocol(uploadProtocol); } @Override public SetProxyHeader setUserIp(java.lang.String userIp) { return (SetProxyHeader) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetProxyHeader setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the TargetTcpProxy resource whose ProxyHeader is to be set. */ @com.google.api.client.util.Key private java.lang.String targetTcpProxy; /** Name of the TargetTcpProxy resource whose ProxyHeader is to be set. */ public java.lang.String getTargetTcpProxy() { return targetTcpProxy; } /** Name of the TargetTcpProxy resource whose ProxyHeader is to be set. */ public SetProxyHeader setTargetTcpProxy(java.lang.String targetTcpProxy) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_TCP_PROXY_PATTERN.matcher(targetTcpProxy).matches(), "Parameter targetTcpProxy must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetTcpProxy = targetTcpProxy; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetProxyHeader setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetProxyHeader set(String parameterName, Object value) { return (SetProxyHeader) super.set(parameterName, value); } } } /** * An accessor for creating requests from the TargetVpnGateways collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.TargetVpnGateways.List request = compute.targetVpnGateways().list(parameters ...)}
   * 
* * @return the resource collection */ public TargetVpnGateways targetVpnGateways() { return new TargetVpnGateways(); } /** * The "targetVpnGateways" collection of methods. */ public class TargetVpnGateways { /** * Retrieves an aggregated list of target VPN gateways. To prevent failure, Google recommends that * you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "targetVpnGateways.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/targetVpnGateways"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of target VPN gateways. To prevent failure, Google recommends that * you set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "targetVpnGateways.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetVpnGatewayAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified target VPN gateway. * * Create a request for the method "targetVpnGateways.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param targetVpnGateway Name of the target VPN gateway to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String targetVpnGateway) throws java.io.IOException { Delete result = new Delete(project, region, targetVpnGateway); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_VPN_GATEWAY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified target VPN gateway. * * Create a request for the method "targetVpnGateways.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param targetVpnGateway Name of the target VPN gateway to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String targetVpnGateway) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetVpnGateway = com.google.api.client.util.Preconditions.checkNotNull(targetVpnGateway, "Required parameter targetVpnGateway must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_VPN_GATEWAY_PATTERN.matcher(targetVpnGateway).matches(), "Parameter targetVpnGateway must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the target VPN gateway to delete. */ @com.google.api.client.util.Key private java.lang.String targetVpnGateway; /** Name of the target VPN gateway to delete. */ public java.lang.String getTargetVpnGateway() { return targetVpnGateway; } /** Name of the target VPN gateway to delete. */ public Delete setTargetVpnGateway(java.lang.String targetVpnGateway) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_VPN_GATEWAY_PATTERN.matcher(targetVpnGateway).matches(), "Parameter targetVpnGateway must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetVpnGateway = targetVpnGateway; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified target VPN gateway. * * Create a request for the method "targetVpnGateways.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param targetVpnGateway Name of the target VPN gateway to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String targetVpnGateway) throws java.io.IOException { Get result = new Get(project, region, targetVpnGateway); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern TARGET_VPN_GATEWAY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified target VPN gateway. * * Create a request for the method "targetVpnGateways.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param targetVpnGateway Name of the target VPN gateway to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String targetVpnGateway) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetVpnGateway.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.targetVpnGateway = com.google.api.client.util.Preconditions.checkNotNull(targetVpnGateway, "Required parameter targetVpnGateway must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_VPN_GATEWAY_PATTERN.matcher(targetVpnGateway).matches(), "Parameter targetVpnGateway must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the target VPN gateway to return. */ @com.google.api.client.util.Key private java.lang.String targetVpnGateway; /** Name of the target VPN gateway to return. */ public java.lang.String getTargetVpnGateway() { return targetVpnGateway; } /** Name of the target VPN gateway to return. */ public Get setTargetVpnGateway(java.lang.String targetVpnGateway) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(TARGET_VPN_GATEWAY_PATTERN.matcher(targetVpnGateway).matches(), "Parameter targetVpnGateway must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.targetVpnGateway = targetVpnGateway; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a target VPN gateway in the specified project and region using the data included in the * request. * * Create a request for the method "targetVpnGateways.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.TargetVpnGateway} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.TargetVpnGateway content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetVpnGateways"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a target VPN gateway in the specified project and region using the data included in the * request. * * Create a request for the method "targetVpnGateways.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.TargetVpnGateway} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.TargetVpnGateway content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of target VPN gateways available to the specified project and region. * * Create a request for the method "targetVpnGateways.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetVpnGateways"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of target VPN gateways available to the specified project and region. * * Create a request for the method "targetVpnGateways.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.TargetVpnGatewayList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "targetVpnGateways.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, region, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/targetVpnGateways/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "targetVpnGateways.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The region for this request. */ public java.lang.String getRegion() { return region; } /** The region for this request. */ public SetLabels setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetLabels setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } } /** * An accessor for creating requests from the UrlMaps collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.UrlMaps.List request = compute.urlMaps().list(parameters ...)}
   * 
* * @return the resource collection */ public UrlMaps urlMaps() { return new UrlMaps(); } /** * The "urlMaps" collection of methods. */ public class UrlMaps { /** * Retrieves the list of all UrlMap resources, regional and global, available to the specified * project. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter * to `true`. * * Create a request for the method "urlMaps.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Name of the project scoping this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/urlMaps"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of all UrlMap resources, regional and global, available to the specified * project. To prevent failure, Google recommends that you set the `returnPartialSuccess` * parameter to `true`. * * Create a request for the method "urlMaps.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Name of the project scoping this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.UrlMapsAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Name of the project scoping this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Name of the project scoping this request. */ public java.lang.String getProject() { return project; } /** Name of the project scoping this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified UrlMap resource. * * Create a request for the method "urlMaps.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param urlMap Name of the UrlMap resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String urlMap) throws java.io.IOException { Delete result = new Delete(project, urlMap); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/urlMaps/{urlMap}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern URL_MAP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified UrlMap resource. * * Create a request for the method "urlMaps.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param urlMap Name of the UrlMap resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String urlMap) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.urlMap = com.google.api.client.util.Preconditions.checkNotNull(urlMap, "Required parameter urlMap must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the UrlMap resource to delete. */ @com.google.api.client.util.Key private java.lang.String urlMap; /** Name of the UrlMap resource to delete. */ public java.lang.String getUrlMap() { return urlMap; } /** Name of the UrlMap resource to delete. */ public Delete setUrlMap(java.lang.String urlMap) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.urlMap = urlMap; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified UrlMap resource. * * Create a request for the method "urlMaps.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param urlMap Name of the UrlMap resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String urlMap) throws java.io.IOException { Get result = new Get(project, urlMap); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/urlMaps/{urlMap}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern URL_MAP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified UrlMap resource. * * Create a request for the method "urlMaps.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param urlMap Name of the UrlMap resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String urlMap) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.UrlMap.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.urlMap = com.google.api.client.util.Preconditions.checkNotNull(urlMap, "Required parameter urlMap must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the UrlMap resource to return. */ @com.google.api.client.util.Key private java.lang.String urlMap; /** Name of the UrlMap resource to return. */ public java.lang.String getUrlMap() { return urlMap; } /** Name of the UrlMap resource to return. */ public Get setUrlMap(java.lang.String urlMap) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.urlMap = urlMap; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a UrlMap resource in the specified project using the data included in the request. * * Create a request for the method "urlMaps.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.UrlMap} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.compute.model.UrlMap content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/urlMaps"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Creates a UrlMap resource in the specified project using the data included in the request. * * Create a request for the method "urlMaps.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param content the {@link com.google.api.services.compute.model.UrlMap} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.compute.model.UrlMap content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Initiates a cache invalidation operation, invalidating the specified path, scoped to the * specified UrlMap. For more information, see [Invalidating cached content](/cdn/docs/invalidating- * cached-content). * * Create a request for the method "urlMaps.invalidateCache". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link InvalidateCache#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param urlMap Name of the UrlMap scoping this request. * @param content the {@link com.google.api.services.compute.model.CacheInvalidationRule} * @return the request */ public InvalidateCache invalidateCache(java.lang.String project, java.lang.String urlMap, com.google.api.services.compute.model.CacheInvalidationRule content) throws java.io.IOException { InvalidateCache result = new InvalidateCache(project, urlMap, content); initialize(result); return result; } public class InvalidateCache extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/urlMaps/{urlMap}/invalidateCache"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern URL_MAP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Initiates a cache invalidation operation, invalidating the specified path, scoped to the * specified UrlMap. For more information, see [Invalidating cached * content](/cdn/docs/invalidating-cached-content). * * Create a request for the method "urlMaps.invalidateCache". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link InvalidateCache#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @param urlMap Name of the UrlMap scoping this request. * @param content the {@link com.google.api.services.compute.model.CacheInvalidationRule} * @since 1.13 */ protected InvalidateCache(java.lang.String project, java.lang.String urlMap, com.google.api.services.compute.model.CacheInvalidationRule content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.urlMap = com.google.api.client.util.Preconditions.checkNotNull(urlMap, "Required parameter urlMap must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public InvalidateCache set$Xgafv(java.lang.String $Xgafv) { return (InvalidateCache) super.set$Xgafv($Xgafv); } @Override public InvalidateCache setAccessToken(java.lang.String accessToken) { return (InvalidateCache) super.setAccessToken(accessToken); } @Override public InvalidateCache setAlt(java.lang.String alt) { return (InvalidateCache) super.setAlt(alt); } @Override public InvalidateCache setCallback(java.lang.String callback) { return (InvalidateCache) super.setCallback(callback); } @Override public InvalidateCache setFields(java.lang.String fields) { return (InvalidateCache) super.setFields(fields); } @Override public InvalidateCache setKey(java.lang.String key) { return (InvalidateCache) super.setKey(key); } @Override public InvalidateCache setOauthToken(java.lang.String oauthToken) { return (InvalidateCache) super.setOauthToken(oauthToken); } @Override public InvalidateCache setPrettyPrint(java.lang.Boolean prettyPrint) { return (InvalidateCache) super.setPrettyPrint(prettyPrint); } @Override public InvalidateCache setQuotaUser(java.lang.String quotaUser) { return (InvalidateCache) super.setQuotaUser(quotaUser); } @Override public InvalidateCache setUploadType(java.lang.String uploadType) { return (InvalidateCache) super.setUploadType(uploadType); } @Override public InvalidateCache setUploadProtocol(java.lang.String uploadProtocol) { return (InvalidateCache) super.setUploadProtocol(uploadProtocol); } @Override public InvalidateCache setUserIp(java.lang.String userIp) { return (InvalidateCache) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public InvalidateCache setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the UrlMap scoping this request. */ @com.google.api.client.util.Key private java.lang.String urlMap; /** Name of the UrlMap scoping this request. */ public java.lang.String getUrlMap() { return urlMap; } /** Name of the UrlMap scoping this request. */ public InvalidateCache setUrlMap(java.lang.String urlMap) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.urlMap = urlMap; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public InvalidateCache setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public InvalidateCache set(String parameterName, Object value) { return (InvalidateCache) super.set(parameterName, value); } } /** * Retrieves the list of UrlMap resources available to the specified project. * * Create a request for the method "urlMaps.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/urlMaps"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of UrlMap resources available to the specified project. * * Create a request for the method "urlMaps.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.UrlMapList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches the specified UrlMap resource with the data included in the request. This method supports * PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "urlMaps.patch". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param urlMap Name of the UrlMap resource to patch. * @param content the {@link com.google.api.services.compute.model.UrlMap} * @return the request */ public Patch patch(java.lang.String project, java.lang.String urlMap, com.google.api.services.compute.model.UrlMap content) throws java.io.IOException { Patch result = new Patch(project, urlMap, content); initialize(result); return result; } public class Patch extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/urlMaps/{urlMap}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern URL_MAP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Patches the specified UrlMap resource with the data included in the request. This method * supports PATCH semantics and uses the JSON merge patch format and processing rules. * * Create a request for the method "urlMaps.patch". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param urlMap Name of the UrlMap resource to patch. * @param content the {@link com.google.api.services.compute.model.UrlMap} * @since 1.13 */ protected Patch(java.lang.String project, java.lang.String urlMap, com.google.api.services.compute.model.UrlMap content) { super(Compute.this, "PATCH", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.urlMap = com.google.api.client.util.Preconditions.checkNotNull(urlMap, "Required parameter urlMap must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Patch setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the UrlMap resource to patch. */ @com.google.api.client.util.Key private java.lang.String urlMap; /** Name of the UrlMap resource to patch. */ public java.lang.String getUrlMap() { return urlMap; } /** Name of the UrlMap resource to patch. */ public Patch setUrlMap(java.lang.String urlMap) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.urlMap = urlMap; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Patch setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates the specified UrlMap resource with the data included in the request. * * Create a request for the method "urlMaps.update". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param urlMap Name of the UrlMap resource to update. * @param content the {@link com.google.api.services.compute.model.UrlMap} * @return the request */ public Update update(java.lang.String project, java.lang.String urlMap, com.google.api.services.compute.model.UrlMap content) throws java.io.IOException { Update result = new Update(project, urlMap, content); initialize(result); return result; } public class Update extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/urlMaps/{urlMap}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern URL_MAP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Updates the specified UrlMap resource with the data included in the request. * * Create a request for the method "urlMaps.update". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param urlMap Name of the UrlMap resource to update. * @param content the {@link com.google.api.services.compute.model.UrlMap} * @since 1.13 */ protected Update(java.lang.String project, java.lang.String urlMap, com.google.api.services.compute.model.UrlMap content) { super(Compute.this, "PUT", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.urlMap = com.google.api.client.util.Preconditions.checkNotNull(urlMap, "Required parameter urlMap must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Update setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the UrlMap resource to update. */ @com.google.api.client.util.Key private java.lang.String urlMap; /** Name of the UrlMap resource to update. */ public java.lang.String getUrlMap() { return urlMap; } /** Name of the UrlMap resource to update. */ public Update setUrlMap(java.lang.String urlMap) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.urlMap = urlMap; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Update setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } /** * Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be * run. Calling this method does NOT create the UrlMap. * * Create a request for the method "urlMaps.validate". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Validate#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param urlMap Name of the UrlMap resource to be validated as. * @param content the {@link com.google.api.services.compute.model.UrlMapsValidateRequest} * @return the request */ public Validate validate(java.lang.String project, java.lang.String urlMap, com.google.api.services.compute.model.UrlMapsValidateRequest content) throws java.io.IOException { Validate result = new Validate(project, urlMap, content); initialize(result); return result; } public class Validate extends ComputeRequest { private static final String REST_PATH = "projects/{project}/global/urlMaps/{urlMap}/validate"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern URL_MAP_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be * run. Calling this method does NOT create the UrlMap. * * Create a request for the method "urlMaps.validate". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Validate#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param urlMap Name of the UrlMap resource to be validated as. * @param content the {@link com.google.api.services.compute.model.UrlMapsValidateRequest} * @since 1.13 */ protected Validate(java.lang.String project, java.lang.String urlMap, com.google.api.services.compute.model.UrlMapsValidateRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.UrlMapsValidateResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.urlMap = com.google.api.client.util.Preconditions.checkNotNull(urlMap, "Required parameter urlMap must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Validate set$Xgafv(java.lang.String $Xgafv) { return (Validate) super.set$Xgafv($Xgafv); } @Override public Validate setAccessToken(java.lang.String accessToken) { return (Validate) super.setAccessToken(accessToken); } @Override public Validate setAlt(java.lang.String alt) { return (Validate) super.setAlt(alt); } @Override public Validate setCallback(java.lang.String callback) { return (Validate) super.setCallback(callback); } @Override public Validate setFields(java.lang.String fields) { return (Validate) super.setFields(fields); } @Override public Validate setKey(java.lang.String key) { return (Validate) super.setKey(key); } @Override public Validate setOauthToken(java.lang.String oauthToken) { return (Validate) super.setOauthToken(oauthToken); } @Override public Validate setPrettyPrint(java.lang.Boolean prettyPrint) { return (Validate) super.setPrettyPrint(prettyPrint); } @Override public Validate setQuotaUser(java.lang.String quotaUser) { return (Validate) super.setQuotaUser(quotaUser); } @Override public Validate setUploadType(java.lang.String uploadType) { return (Validate) super.setUploadType(uploadType); } @Override public Validate setUploadProtocol(java.lang.String uploadProtocol) { return (Validate) super.setUploadProtocol(uploadProtocol); } @Override public Validate setUserIp(java.lang.String userIp) { return (Validate) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Validate setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the UrlMap resource to be validated as. */ @com.google.api.client.util.Key private java.lang.String urlMap; /** Name of the UrlMap resource to be validated as. */ public java.lang.String getUrlMap() { return urlMap; } /** Name of the UrlMap resource to be validated as. */ public Validate setUrlMap(java.lang.String urlMap) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(URL_MAP_PATTERN.matcher(urlMap).matches(), "Parameter urlMap must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.urlMap = urlMap; return this; } @Override public Validate set(String parameterName, Object value) { return (Validate) super.set(parameterName, value); } } } /** * An accessor for creating requests from the VpnGateways collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.VpnGateways.List request = compute.vpnGateways().list(parameters ...)}
   * 
* * @return the resource collection */ public VpnGateways vpnGateways() { return new VpnGateways(); } /** * The "vpnGateways" collection of methods. */ public class VpnGateways { /** * Retrieves an aggregated list of VPN gateways. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "vpnGateways.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/vpnGateways"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of VPN gateways. To prevent failure, Google recommends that you * set the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "vpnGateways.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.VpnGatewayAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified VPN gateway. * * Create a request for the method "vpnGateways.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param vpnGateway Name of the VPN gateway to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String vpnGateway) throws java.io.IOException { Delete result = new Delete(project, region, vpnGateway); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern VPN_GATEWAY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified VPN gateway. * * Create a request for the method "vpnGateways.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param vpnGateway Name of the VPN gateway to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String vpnGateway) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.vpnGateway = com.google.api.client.util.Preconditions.checkNotNull(vpnGateway, "Required parameter vpnGateway must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(VPN_GATEWAY_PATTERN.matcher(vpnGateway).matches(), "Parameter vpnGateway must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the VPN gateway to delete. */ @com.google.api.client.util.Key private java.lang.String vpnGateway; /** Name of the VPN gateway to delete. */ public java.lang.String getVpnGateway() { return vpnGateway; } /** Name of the VPN gateway to delete. */ public Delete setVpnGateway(java.lang.String vpnGateway) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(VPN_GATEWAY_PATTERN.matcher(vpnGateway).matches(), "Parameter vpnGateway must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.vpnGateway = vpnGateway; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified VPN gateway. * * Create a request for the method "vpnGateways.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param vpnGateway Name of the VPN gateway to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String vpnGateway) throws java.io.IOException { Get result = new Get(project, region, vpnGateway); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern VPN_GATEWAY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified VPN gateway. * * Create a request for the method "vpnGateways.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param vpnGateway Name of the VPN gateway to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String vpnGateway) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.VpnGateway.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.vpnGateway = com.google.api.client.util.Preconditions.checkNotNull(vpnGateway, "Required parameter vpnGateway must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(VPN_GATEWAY_PATTERN.matcher(vpnGateway).matches(), "Parameter vpnGateway must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the VPN gateway to return. */ @com.google.api.client.util.Key private java.lang.String vpnGateway; /** Name of the VPN gateway to return. */ public java.lang.String getVpnGateway() { return vpnGateway; } /** Name of the VPN gateway to return. */ public Get setVpnGateway(java.lang.String vpnGateway) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(VPN_GATEWAY_PATTERN.matcher(vpnGateway).matches(), "Parameter vpnGateway must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.vpnGateway = vpnGateway; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Returns the status for the specified VPN gateway. * * Create a request for the method "vpnGateways.getStatus". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link GetStatus#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param vpnGateway Name of the VPN gateway to return. * @return the request */ public GetStatus getStatus(java.lang.String project, java.lang.String region, java.lang.String vpnGateway) throws java.io.IOException { GetStatus result = new GetStatus(project, region, vpnGateway); initialize(result); return result; } public class GetStatus extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}/getStatus"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern VPN_GATEWAY_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the status for the specified VPN gateway. * * Create a request for the method "vpnGateways.getStatus". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link GetStatus#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param vpnGateway Name of the VPN gateway to return. * @since 1.13 */ protected GetStatus(java.lang.String project, java.lang.String region, java.lang.String vpnGateway) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.VpnGatewaysGetStatusResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.vpnGateway = com.google.api.client.util.Preconditions.checkNotNull(vpnGateway, "Required parameter vpnGateway must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(VPN_GATEWAY_PATTERN.matcher(vpnGateway).matches(), "Parameter vpnGateway must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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 GetStatus set$Xgafv(java.lang.String $Xgafv) { return (GetStatus) super.set$Xgafv($Xgafv); } @Override public GetStatus setAccessToken(java.lang.String accessToken) { return (GetStatus) super.setAccessToken(accessToken); } @Override public GetStatus setAlt(java.lang.String alt) { return (GetStatus) super.setAlt(alt); } @Override public GetStatus setCallback(java.lang.String callback) { return (GetStatus) super.setCallback(callback); } @Override public GetStatus setFields(java.lang.String fields) { return (GetStatus) super.setFields(fields); } @Override public GetStatus setKey(java.lang.String key) { return (GetStatus) super.setKey(key); } @Override public GetStatus setOauthToken(java.lang.String oauthToken) { return (GetStatus) super.setOauthToken(oauthToken); } @Override public GetStatus setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetStatus) super.setPrettyPrint(prettyPrint); } @Override public GetStatus setQuotaUser(java.lang.String quotaUser) { return (GetStatus) super.setQuotaUser(quotaUser); } @Override public GetStatus setUploadType(java.lang.String uploadType) { return (GetStatus) super.setUploadType(uploadType); } @Override public GetStatus setUploadProtocol(java.lang.String uploadProtocol) { return (GetStatus) super.setUploadProtocol(uploadProtocol); } @Override public GetStatus setUserIp(java.lang.String userIp) { return (GetStatus) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public GetStatus setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public GetStatus setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the VPN gateway to return. */ @com.google.api.client.util.Key private java.lang.String vpnGateway; /** Name of the VPN gateway to return. */ public java.lang.String getVpnGateway() { return vpnGateway; } /** Name of the VPN gateway to return. */ public GetStatus setVpnGateway(java.lang.String vpnGateway) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(VPN_GATEWAY_PATTERN.matcher(vpnGateway).matches(), "Parameter vpnGateway must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.vpnGateway = vpnGateway; return this; } @Override public GetStatus set(String parameterName, Object value) { return (GetStatus) super.set(parameterName, value); } } /** * Creates a VPN gateway in the specified project and region using the data included in the request. * * Create a request for the method "vpnGateways.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.VpnGateway} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.VpnGateway content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/vpnGateways"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a VPN gateway in the specified project and region using the data included in the * request. * * Create a request for the method "vpnGateways.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.VpnGateway} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.VpnGateway content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of VPN gateways available to the specified project and region. * * Create a request for the method "vpnGateways.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/vpnGateways"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of VPN gateways available to the specified project and region. * * Create a request for the method "vpnGateways.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.VpnGatewayList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "vpnGateways.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, region, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/vpnGateways/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "vpnGateways.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The region for this request. */ public java.lang.String getRegion() { return region; } /** The region for this request. */ public SetLabels setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetLabels setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "vpnGateways.testIamPermissions". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(project, region, resource, content); initialize(result); return result; } public class TestIamPermissions extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/vpnGateways/{resource}/testIamPermissions"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns permissions that a caller has on the specified resource. * * Create a request for the method "vpnGateways.testIamPermissions". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param project Project ID for this request. * @param region The name of the region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.TestPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.TestPermissionsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.TestPermissionsResponse.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public TestIamPermissions setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The name of the region for this request. */ public java.lang.String getRegion() { return region; } /** The name of the region for this request. */ public TestIamPermissions setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the VpnTunnels collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.VpnTunnels.List request = compute.vpnTunnels().list(parameters ...)}
   * 
* * @return the resource collection */ public VpnTunnels vpnTunnels() { return new VpnTunnels(); } /** * The "vpnTunnels" collection of methods. */ public class VpnTunnels { /** * Retrieves an aggregated list of VPN tunnels. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "vpnTunnels.aggregatedList". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public AggregatedList aggregatedList(java.lang.String project) throws java.io.IOException { AggregatedList result = new AggregatedList(project); initialize(result); return result; } public class AggregatedList extends ComputeRequest { private static final String REST_PATH = "projects/{project}/aggregated/vpnTunnels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves an aggregated list of VPN tunnels. To prevent failure, Google recommends that you set * the `returnPartialSuccess` parameter to `true`. * * Create a request for the method "vpnTunnels.aggregatedList". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link AggregatedList#execute()} method to invoke the remote operation. *

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

* * @param project Project ID for this request. * @since 1.13 */ protected AggregatedList(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.VpnTunnelAggregatedList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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 AggregatedList set$Xgafv(java.lang.String $Xgafv) { return (AggregatedList) super.set$Xgafv($Xgafv); } @Override public AggregatedList setAccessToken(java.lang.String accessToken) { return (AggregatedList) super.setAccessToken(accessToken); } @Override public AggregatedList setAlt(java.lang.String alt) { return (AggregatedList) super.setAlt(alt); } @Override public AggregatedList setCallback(java.lang.String callback) { return (AggregatedList) super.setCallback(callback); } @Override public AggregatedList setFields(java.lang.String fields) { return (AggregatedList) super.setFields(fields); } @Override public AggregatedList setKey(java.lang.String key) { return (AggregatedList) super.setKey(key); } @Override public AggregatedList setOauthToken(java.lang.String oauthToken) { return (AggregatedList) super.setOauthToken(oauthToken); } @Override public AggregatedList setPrettyPrint(java.lang.Boolean prettyPrint) { return (AggregatedList) super.setPrettyPrint(prettyPrint); } @Override public AggregatedList setQuotaUser(java.lang.String quotaUser) { return (AggregatedList) super.setQuotaUser(quotaUser); } @Override public AggregatedList setUploadType(java.lang.String uploadType) { return (AggregatedList) super.setUploadType(uploadType); } @Override public AggregatedList setUploadProtocol(java.lang.String uploadProtocol) { return (AggregatedList) super.setUploadProtocol(uploadProtocol); } @Override public AggregatedList setUserIp(java.lang.String userIp) { return (AggregatedList) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public AggregatedList setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public AggregatedList setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ @com.google.api.client.util.Key private java.lang.Boolean includeAllScopes; /** Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ public java.lang.Boolean getIncludeAllScopes() { return includeAllScopes; } /** * Indicates whether every visible scope for each scope type (zone, region, global) should be * included in the response. For new resource types added after this field, the flag has no * effect as new resource types will always include every visible scope for each scope type in * response. For resource types which predate this field, if this flag is omitted or false, * only scopes of the scope types where the resource type is expected to be found will be * included. */ public AggregatedList setIncludeAllScopes(java.lang.Boolean includeAllScopes) { this.includeAllScopes = includeAllScopes; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public AggregatedList setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public AggregatedList setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public AggregatedList setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public AggregatedList setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ @com.google.api.client.util.Key private java.lang.Long serviceProjectNumber; /** The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. */ public java.lang.Long getServiceProjectNumber() { return serviceProjectNumber; } /** * The Shared VPC service project id or service project number for which aggregated list * request is invoked for subnetworks list-usable api. */ public AggregatedList setServiceProjectNumber(java.lang.Long serviceProjectNumber) { this.serviceProjectNumber = serviceProjectNumber; return this; } @Override public AggregatedList set(String parameterName, Object value) { return (AggregatedList) super.set(parameterName, value); } } /** * Deletes the specified VpnTunnel resource. * * Create a request for the method "vpnTunnels.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param vpnTunnel Name of the VpnTunnel resource to delete. * @return the request */ public Delete delete(java.lang.String project, java.lang.String region, java.lang.String vpnTunnel) throws java.io.IOException { Delete result = new Delete(project, region, vpnTunnel); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern VPN_TUNNEL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified VpnTunnel resource. * * Create a request for the method "vpnTunnels.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param vpnTunnel Name of the VpnTunnel resource to delete. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String region, java.lang.String vpnTunnel) { super(Compute.this, "DELETE", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.vpnTunnel = com.google.api.client.util.Preconditions.checkNotNull(vpnTunnel, "Required parameter vpnTunnel must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(VPN_TUNNEL_PATTERN.matcher(vpnTunnel).matches(), "Parameter vpnTunnel must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Delete setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the VpnTunnel resource to delete. */ @com.google.api.client.util.Key private java.lang.String vpnTunnel; /** Name of the VpnTunnel resource to delete. */ public java.lang.String getVpnTunnel() { return vpnTunnel; } /** Name of the VpnTunnel resource to delete. */ public Delete setVpnTunnel(java.lang.String vpnTunnel) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(VPN_TUNNEL_PATTERN.matcher(vpnTunnel).matches(), "Parameter vpnTunnel must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.vpnTunnel = vpnTunnel; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ 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); } } /** * Returns the specified VpnTunnel resource. * * Create a request for the method "vpnTunnels.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param vpnTunnel Name of the VpnTunnel resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String region, java.lang.String vpnTunnel) throws java.io.IOException { Get result = new Get(project, region, vpnTunnel); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern VPN_TUNNEL_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified VpnTunnel resource. * * Create a request for the method "vpnTunnels.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @param vpnTunnel Name of the VpnTunnel resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String region, java.lang.String vpnTunnel) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.VpnTunnel.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.vpnTunnel = com.google.api.client.util.Preconditions.checkNotNull(vpnTunnel, "Required parameter vpnTunnel must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(VPN_TUNNEL_PATTERN.matcher(vpnTunnel).matches(), "Parameter vpnTunnel must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Get setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name of the VpnTunnel resource to return. */ @com.google.api.client.util.Key private java.lang.String vpnTunnel; /** Name of the VpnTunnel resource to return. */ public java.lang.String getVpnTunnel() { return vpnTunnel; } /** Name of the VpnTunnel resource to return. */ public Get setVpnTunnel(java.lang.String vpnTunnel) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(VPN_TUNNEL_PATTERN.matcher(vpnTunnel).matches(), "Parameter vpnTunnel must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.vpnTunnel = vpnTunnel; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a VpnTunnel resource in the specified project and region using the data included in the * request. * * Create a request for the method "vpnTunnels.insert". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.VpnTunnel} * @return the request */ public Insert insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.VpnTunnel content) throws java.io.IOException { Insert result = new Insert(project, region, content); initialize(result); return result; } public class Insert extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/vpnTunnels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Creates a VpnTunnel resource in the specified project and region using the data included in the * request. * * Create a request for the method "vpnTunnels.insert". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region Name of the region for this request. * @param content the {@link com.google.api.services.compute.model.VpnTunnel} * @since 1.13 */ protected Insert(java.lang.String project, java.lang.String region, com.google.api.services.compute.model.VpnTunnel content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Insert setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public Insert setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of VpnTunnel resources contained in the specified project and region. * * Create a request for the method "vpnTunnels.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region Name of the region for this request. * @return the request */ public List list(java.lang.String project, java.lang.String region) throws java.io.IOException { List result = new List(project, region); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/vpnTunnels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of VpnTunnel resources contained in the specified project and region. * * Create a request for the method "vpnTunnels.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param region Name of the region for this request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String region) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.VpnTunnelList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** Name of the region for this request. */ public java.lang.String getRegion() { return region; } /** Name of the region for this request. */ public List setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "vpnTunnels.setLabels". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @return the request */ public SetLabels setLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) throws java.io.IOException { SetLabels result = new SetLabels(project, region, resource, content); initialize(result); return result; } public class SetLabels extends ComputeRequest { private static final String REST_PATH = "projects/{project}/regions/{region}/vpnTunnels/{resource}/setLabels"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern REGION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources * documentation. * * Create a request for the method "vpnTunnels.setLabels". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link SetLabels#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param region The region for this request. * @param resource Name or id of the resource for this request. * @param content the {@link com.google.api.services.compute.model.RegionSetLabelsRequest} * @since 1.13 */ protected SetLabels(java.lang.String project, java.lang.String region, java.lang.String resource, com.google.api.services.compute.model.RegionSetLabelsRequest content) { super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.region = com.google.api.client.util.Preconditions.checkNotNull(region, "Required parameter region must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public SetLabels set$Xgafv(java.lang.String $Xgafv) { return (SetLabels) super.set$Xgafv($Xgafv); } @Override public SetLabels setAccessToken(java.lang.String accessToken) { return (SetLabels) super.setAccessToken(accessToken); } @Override public SetLabels setAlt(java.lang.String alt) { return (SetLabels) super.setAlt(alt); } @Override public SetLabels setCallback(java.lang.String callback) { return (SetLabels) super.setCallback(callback); } @Override public SetLabels setFields(java.lang.String fields) { return (SetLabels) super.setFields(fields); } @Override public SetLabels setKey(java.lang.String key) { return (SetLabels) super.setKey(key); } @Override public SetLabels setOauthToken(java.lang.String oauthToken) { return (SetLabels) super.setOauthToken(oauthToken); } @Override public SetLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetLabels) super.setPrettyPrint(prettyPrint); } @Override public SetLabels setQuotaUser(java.lang.String quotaUser) { return (SetLabels) super.setQuotaUser(quotaUser); } @Override public SetLabels setUploadType(java.lang.String uploadType) { return (SetLabels) super.setUploadType(uploadType); } @Override public SetLabels setUploadProtocol(java.lang.String uploadProtocol) { return (SetLabels) super.setUploadProtocol(uploadProtocol); } @Override public SetLabels setUserIp(java.lang.String userIp) { return (SetLabels) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public SetLabels setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** The region for this request. */ @com.google.api.client.util.Key private java.lang.String region; /** The region for this request. */ public java.lang.String getRegion() { return region; } /** The region for this request. */ public SetLabels setRegion(java.lang.String region) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REGION_PATTERN.matcher(region).matches(), "Parameter region must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.region = region; return this; } /** Name or id of the resource for this request. */ @com.google.api.client.util.Key private java.lang.String resource; /** Name or id of the resource for this request. */ public java.lang.String getResource() { return resource; } /** Name or id of the resource for this request. */ public SetLabels setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.resource = resource; return this; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ @com.google.api.client.util.Key private java.lang.String requestId; /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). */ public java.lang.String getRequestId() { return requestId; } /** * An optional request ID to identify requests. Specify a unique request ID so that if you * must retry your request, the server will know to ignore the request if it has already been * completed. For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, the server can * check if original operation with the same request ID was received, and if so, will ignore * the second request. This prevents clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is not supported ( * 00000000-0000-0000-0000-000000000000). */ public SetLabels setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public SetLabels set(String parameterName, Object value) { return (SetLabels) super.set(parameterName, value); } } } /** * An accessor for creating requests from the ZoneOperations collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.ZoneOperations.List request = compute.zoneOperations().list(parameters ...)}
   * 
* * @return the resource collection */ public ZoneOperations zoneOperations() { return new ZoneOperations(); } /** * The "zoneOperations" collection of methods. */ public class ZoneOperations { /** * Deletes the specified zone-specific Operations resource. * * Create a request for the method "zoneOperations.delete". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param operation Name of the Operations resource to delete, or its unique numeric identifier. * @return the request */ public Delete delete(java.lang.String project, java.lang.String zone, java.lang.String operation) throws java.io.IOException { Delete result = new Delete(project, zone, operation); initialize(result); return result; } public class Delete extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/operations/{operation}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern OPERATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Deletes the specified zone-specific Operations resource. * * Create a request for the method "zoneOperations.delete". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone for this request. * @param operation Name of the Operations resource to delete, or its unique numeric identifier. * @since 1.13 */ protected Delete(java.lang.String project, java.lang.String zone, java.lang.String operation) { super(Compute.this, "DELETE", REST_PATH, null, Void.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.operation = com.google.api.client.util.Preconditions.checkNotNull(operation, "Required parameter operation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Delete setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public Delete setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the Operations resource to delete, or its unique numeric identifier. */ @com.google.api.client.util.Key private java.lang.String operation; /** Name of the Operations resource to delete, or its unique numeric identifier. */ public java.lang.String getOperation() { return operation; } /** Name of the Operations resource to delete, or its unique numeric identifier. */ public Delete setOperation(java.lang.String operation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.operation = operation; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves the specified zone-specific Operations resource. * * Create a request for the method "zoneOperations.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param operation Name of the Operations resource to return, or its unique numeric identifier. * @return the request */ public Get get(java.lang.String project, java.lang.String zone, java.lang.String operation) throws java.io.IOException { Get result = new Get(project, zone, operation); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/operations/{operation}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern OPERATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Retrieves the specified zone-specific Operations resource. * * Create a request for the method "zoneOperations.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone for this request. * @param operation Name of the Operations resource to return, or its unique numeric identifier. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone, java.lang.String operation) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.operation = com.google.api.client.util.Preconditions.checkNotNull(operation, "Required parameter operation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the Operations resource to return, or its unique numeric identifier. */ @com.google.api.client.util.Key private java.lang.String operation; /** Name of the Operations resource to return, or its unique numeric identifier. */ public java.lang.String getOperation() { return operation; } /** Name of the Operations resource to return, or its unique numeric identifier. */ public Get setOperation(java.lang.String operation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.operation = operation; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves a list of Operation resources contained within the specified zone. * * Create a request for the method "zoneOperations.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for request. * @return the request */ public List list(java.lang.String project, java.lang.String zone) throws java.io.IOException { List result = new List(project, zone); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/operations"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); /** * Retrieves a list of Operation resources contained within the specified zone. * * Create a request for the method "zoneOperations.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone for request. * @since 1.13 */ protected List(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.OperationList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for request. */ public List setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Waits for the specified Operation resource to return as `DONE` or for the request to approach the * 2 minute deadline, and retrieves the specified Operation resource. This method waits for no more * than the 2 minutes and then returns the current state of the operation, which might be `DONE` or * still in progress. This method is called on a best-effort basis. Specifically: - In uncommon * cases, when the server is overloaded, the request might return before the default deadline is * reached, or might return after zero seconds. - If the default deadline is reached, there is no * guarantee that the operation is actually done when the method returns. Be prepared to retry if * the operation is not `DONE`. * * Create a request for the method "zoneOperations.wait". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Wait#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param operation Name of the Operations resource to return, or its unique numeric identifier. * @return the request */ public Wait wait(java.lang.String project, java.lang.String zone, java.lang.String operation) throws java.io.IOException { Wait result = new Wait(project, zone, operation); initialize(result); return result; } public class Wait extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}/operations/{operation}/wait"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); private final java.util.regex.Pattern OPERATION_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Waits for the specified Operation resource to return as `DONE` or for the request to approach * the 2 minute deadline, and retrieves the specified Operation resource. This method waits for no * more than the 2 minutes and then returns the current state of the operation, which might be * `DONE` or still in progress. This method is called on a best-effort basis. Specifically: - In * uncommon cases, when the server is overloaded, the request might return before the default * deadline is reached, or might return after zero seconds. - If the default deadline is reached, * there is no guarantee that the operation is actually done when the method returns. Be prepared * to retry if the operation is not `DONE`. * * Create a request for the method "zoneOperations.wait". * * This request holds the parameters needed by the the compute server. After setting any optional * parameters, call the {@link Wait#execute()} method to invoke the remote operation.

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

* * @param project Project ID for this request. * @param zone Name of the zone for this request. * @param operation Name of the Operations resource to return, or its unique numeric identifier. * @since 1.13 */ protected Wait(java.lang.String project, java.lang.String zone, java.lang.String operation) { super(Compute.this, "POST", REST_PATH, null, com.google.api.services.compute.model.Operation.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.operation = com.google.api.client.util.Preconditions.checkNotNull(operation, "Required parameter operation must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @Override public Wait set$Xgafv(java.lang.String $Xgafv) { return (Wait) super.set$Xgafv($Xgafv); } @Override public Wait setAccessToken(java.lang.String accessToken) { return (Wait) super.setAccessToken(accessToken); } @Override public Wait setAlt(java.lang.String alt) { return (Wait) super.setAlt(alt); } @Override public Wait setCallback(java.lang.String callback) { return (Wait) super.setCallback(callback); } @Override public Wait setFields(java.lang.String fields) { return (Wait) super.setFields(fields); } @Override public Wait setKey(java.lang.String key) { return (Wait) super.setKey(key); } @Override public Wait setOauthToken(java.lang.String oauthToken) { return (Wait) super.setOauthToken(oauthToken); } @Override public Wait setPrettyPrint(java.lang.Boolean prettyPrint) { return (Wait) super.setPrettyPrint(prettyPrint); } @Override public Wait setQuotaUser(java.lang.String quotaUser) { return (Wait) super.setQuotaUser(quotaUser); } @Override public Wait setUploadType(java.lang.String uploadType) { return (Wait) super.setUploadType(uploadType); } @Override public Wait setUploadProtocol(java.lang.String uploadProtocol) { return (Wait) super.setUploadProtocol(uploadProtocol); } @Override public Wait setUserIp(java.lang.String userIp) { return (Wait) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Wait setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone for this request. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone for this request. */ public java.lang.String getZone() { return zone; } /** Name of the zone for this request. */ public Wait setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"); } this.zone = zone; return this; } /** Name of the Operations resource to return, or its unique numeric identifier. */ @com.google.api.client.util.Key private java.lang.String operation; /** Name of the Operations resource to return, or its unique numeric identifier. */ public java.lang.String getOperation() { return operation; } /** Name of the Operations resource to return, or its unique numeric identifier. */ public Wait setOperation(java.lang.String operation) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(OPERATION_PATTERN.matcher(operation).matches(), "Parameter operation must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.operation = operation; return this; } @Override public Wait set(String parameterName, Object value) { return (Wait) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Zones collection. * *

The typical use is:

*
   *   {@code Compute compute = new Compute(...);}
   *   {@code Compute.Zones.List request = compute.zones().list(parameters ...)}
   * 
* * @return the resource collection */ public Zones zones() { return new Zones(); } /** * The "zones" collection of methods. */ public class Zones { /** * Returns the specified Zone resource. * * Create a request for the method "zones.get". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @param zone Name of the zone resource to return. * @return the request */ public Get get(java.lang.String project, java.lang.String zone) throws java.io.IOException { Get result = new Get(project, zone); initialize(result); return result; } public class Get extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones/{zone}"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); private final java.util.regex.Pattern ZONE_PATTERN = java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); /** * Returns the specified Zone resource. * * Create a request for the method "zones.get". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @param zone Name of the zone resource to return. * @since 1.13 */ protected Get(java.lang.String project, java.lang.String zone) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.Zone.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } } @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); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public Get setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** Name of the zone resource to return. */ @com.google.api.client.util.Key private java.lang.String zone; /** Name of the zone resource to return. */ public java.lang.String getZone() { return zone; } /** Name of the zone resource to return. */ public Get setZone(java.lang.String zone) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(), "Parameter zone must conform to the pattern " + "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}"); } this.zone = zone; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves the list of Zone resources available to the specified project. * * Create a request for the method "zones.list". * * This request holds the parameters needed by the compute server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project Project ID for this request. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends ComputeRequest { private static final String REST_PATH = "projects/{project}/zones"; private final java.util.regex.Pattern PROJECT_PATTERN = java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); /** * Retrieves the list of Zone resources available to the specified project. * * Create a request for the method "zones.list". * * This request holds the parameters needed by the the compute 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 project Project ID for this request. * @since 1.13 */ protected List(java.lang.String project) { super(Compute.this, "GET", REST_PATH, null, com.google.api.services.compute.model.ZoneList.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } } @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); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Project ID for this request. */ @com.google.api.client.util.Key private java.lang.String project; /** Project ID for this request. */ public java.lang.String getProject() { return project; } /** Project ID for this request. */ public List setProject(java.lang.String project) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(), "Parameter project must conform to the pattern " + "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"); } this.project = project; return this; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Most Compute resources * support two types of filter expressions: expressions that support regular expressions and * expressions that follow API improvement proposal AIP-160. These two types of filter * expressions cannot be mixed in one request. If you want to use AIP-160, your expression * must specify the field name, an operator, and the value that you want to use for filtering. * The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, * `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, * you can exclude instances named `example-instance` by specifying `name != example- * instance`. The `:*` comparison can be used to test whether a key has been defined. For * example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also * filter nested fields. For example, you could specify `scheduling.automaticRestart = false` * to include instances only if they are not scheduled for automatic restarts. You can use * filtering on nested fields to filter based on resource labels. To filter on multiple * expressions, provide each separate expression within parentheses. For example: ``` * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each * expression is an `AND` expression. However, you can include `AND` and `OR` expressions * explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular * expression, use the `eq` (equal) or `ne` (not equal) operator against a single un- * parenthesized expression with or without quotes or against multiple parenthesized * expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted * literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne * "literal")` The literal value is interpreted as a regular expression using Google RE2 * library syntax. The literal value must match the entire field. For example, to filter for * instances that do not end with name "instance", you would use `name ne .*instance`. You * cannot combine constraints on multiple fields using regular expressions. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) [default: 500] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be * used to get the next page of results in subsequent list requests. Acceptable values are `0` * to `500`, inclusive. (Default: `500`) */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public java.lang.String getOrderBy() { return orderBy; } /** * Sorts list results by a certain order. By default, results are returned in alphanumerical * order based on the resource name. You can also sort results in descending order based on * the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based * on the `creationTimestamp` field in reverse chronological order (newest result first). Use * this to sort resources like operations so that the newest operation is returned first. * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ public java.lang.String getPageToken() { return pageToken; } /** * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a * previous list request to get the next page of results. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ @com.google.api.client.util.Key private java.lang.Boolean returnPartialSuccess; /** Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. */ public java.lang.Boolean getReturnPartialSuccess() { return returnPartialSuccess; } /** * Opt-in for partial success behavior which provides partial results in case of failure. The * default value is false. For example, when partial success behavior is enabled, * aggregatedList for a single zone scope either returns all resources in the zone or no * resources, with an error code. */ public List setReturnPartialSuccess(java.lang.Boolean returnPartialSuccess) { this.returnPartialSuccess = returnPartialSuccess; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * Builder for {@link Compute}. * *

* 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 Compute}. */ @Override public Compute build() { return new Compute(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 ComputeRequestInitializer}. * * @since 1.12 */ public Builder setComputeRequestInitializer( ComputeRequestInitializer computeRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(computeRequestInitializer); } @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 - 2024 Weber Informatics LLC | Privacy Policy